screenshot plugin: add screenshot on valuable/untradeable item drop

This commit is contained in:
tanlines
2018-12-06 01:17:28 +11:00
committed by Adam
parent 86faa466e0
commit 83eee1f074
3 changed files with 46 additions and 1 deletions

View File

@@ -63,6 +63,8 @@ public class ScreenshotPluginTest
private static final String BARROWS_CHEST = "Your Barrows chest count is <col=ff0000>310</col>";
private static final String CHAMBERS_OF_XERIC_CHEST = "Your completed Chambers of Xeric count is: <col=ff0000>489</col>.";
private static final String THEATRE_OF_BLOOD_CHEST = "Your completed Theatre of Blood count is: <col=ff0000>73</col>.";
private static final String VALUABLE_DROP = "<col=ef1020>Valuable drop: 6 x Bronze arrow (42 coins)</col>";
private static final String UNTRADEABLE_DROP = "<col=ef1020>Untradeable drop: Rusty sword";
@Mock
@Bind
@@ -101,6 +103,7 @@ public class ScreenshotPluginTest
Guice.createInjector(BoundFieldModule.of(this)).injectMembers(this);
when(screenshotConfig.screenshotRewards()).thenReturn(true);
when(screenshotConfig.screenshotLevels()).thenReturn(true);
when(screenshotConfig.screenshotValuableDrop()).thenReturn(true);
}
@Test
@@ -140,6 +143,24 @@ public class ScreenshotPluginTest
assertEquals(73, screenshotPlugin.gettheatreOfBloodNumber());
}
@Test
public void testValuableDrop()
{
ChatMessage chatMessageEvent = new ChatMessage(SERVER, "", VALUABLE_DROP, null);
screenshotPlugin.onChatMessage(chatMessageEvent);
verify(drawManager).requestNextFrameListener(Matchers.any(Consumer.class));
}
@Test
public void testUntradeableDrop()
{
ChatMessage chatMessageEvent = new ChatMessage(SERVER, "", UNTRADEABLE_DROP, null);
screenshotPlugin.onChatMessage(chatMessageEvent);
verify(drawManager).requestNextFrameListener(Matchers.any(Consumer.class));
}
@Test
public void testHitpointsLevel99()
{