Java Code Examples for net.runelite.api.events.GameTick#INSTANCE
The following examples show how to use
net.runelite.api.events.GameTick#INSTANCE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScreenshotPluginTest.java From plugins with GNU General Public License v3.0 | 6 votes |
@Test public void testHitpointsLevel99() { Widget levelChild = mock(Widget.class); when(client.getWidget(eq(LEVEL_UP_LEVEL))).thenReturn(levelChild); when(levelChild.getText()).thenReturn("Your Hitpoints are now 99."); assertEquals("Hitpoints(99)", screenshotPlugin.parseLevelUpWidget(client.getWidget(LEVEL_UP_LEVEL))); WidgetLoaded event = new WidgetLoaded(); event.setGroupId(LEVEL_UP_GROUP_ID); screenshotPlugin.onWidgetLoaded(event); GameTick tick = GameTick.INSTANCE; screenshotPlugin.onGameTick(tick); verify(drawManager).requestNextFrameListener(any(Consumer.class)); }
Example 2
Source File: ScreenshotPluginTest.java From plugins with GNU General Public License v3.0 | 6 votes |
@Test public void testFiremakingLevel9() { Widget levelChild = mock(Widget.class); when(client.getWidget(eq(LEVEL_UP_LEVEL))).thenReturn(levelChild); when(levelChild.getText()).thenReturn("Your Firemaking level is now 9."); assertEquals("Firemaking(9)", screenshotPlugin.parseLevelUpWidget(client.getWidget(LEVEL_UP_LEVEL))); WidgetLoaded event = new WidgetLoaded(); event.setGroupId(LEVEL_UP_GROUP_ID); screenshotPlugin.onWidgetLoaded(event); GameTick tick = GameTick.INSTANCE; screenshotPlugin.onGameTick(tick); verify(drawManager).requestNextFrameListener(any(Consumer.class)); }
Example 3
Source File: ScreenshotPluginTest.java From plugins with GNU General Public License v3.0 | 6 votes |
@Test public void testAttackLevel70() { Widget levelChild = mock(Widget.class); when(client.getWidget(eq(LEVEL_UP_LEVEL))).thenReturn(levelChild); when(levelChild.getText()).thenReturn("Your Attack level is now 70."); assertEquals("Attack(70)", screenshotPlugin.parseLevelUpWidget(client.getWidget(LEVEL_UP_LEVEL))); WidgetLoaded event = new WidgetLoaded(); event.setGroupId(LEVEL_UP_GROUP_ID); screenshotPlugin.onWidgetLoaded(event); GameTick tick = GameTick.INSTANCE; screenshotPlugin.onGameTick(tick); verify(drawManager).requestNextFrameListener(any(Consumer.class)); }
Example 4
Source File: ScreenshotPluginTest.java From plugins with GNU General Public License v3.0 | 6 votes |
@Test public void testHunterLevel2() { Widget levelChild = mock(Widget.class); when(client.getWidget(eq(DIALOG_SPRITE_TEXT))).thenReturn(levelChild); when(levelChild.getText()).thenReturn("<col=000080>Congratulations, you've just advanced a Hunter level.<col=000000><br><br>Your Hunter level is now 2."); assertEquals("Hunter(2)", screenshotPlugin.parseLevelUpWidget(client.getWidget(DIALOG_SPRITE_TEXT))); WidgetLoaded event = new WidgetLoaded(); event.setGroupId(DIALOG_SPRITE_GROUP_ID); screenshotPlugin.onWidgetLoaded(event); GameTick tick = GameTick.INSTANCE; screenshotPlugin.onGameTick(tick); verify(drawManager).requestNextFrameListener(any(Consumer.class)); }