slayer: Add combat bracelet task update handling

Fixes runelite/runelite#4473
This commit is contained in:
Jordan Atwood
2018-10-12 14:35:24 -07:00
parent f09f609784
commit 8594cd4a93
2 changed files with 28 additions and 4 deletions

View File

@@ -58,6 +58,7 @@ public class SlayerPluginTest
private static final String TASK_NEW_FROM_PARTNER = "You have received a new Slayer assignment from breaklulz: Dust Devils (377)";
private static final String TASK_CHECKSLAYERGEM_WILDERNESS = "You're assigned to kill Suqahs in the Wilderness; only 211 more to go.";
private static final String TASK_CHECKSLAYERGEM = "You're assigned to kill Suqahs; only 211 more to go.";
private static final String TASK_UPDATE_COMBAT_BRACELET = "You still need to kill 30 monsters to complete your current Slayer assignment";
private static final String TASK_BOSS_NEW = "Excellent. You're now assigned to kill Vet'ion 3 times.<br>Your reward point tally is 914.";
private static final String TASK_BOSS_NEW_THE = "Excellent. You're now assigned to kill the Chaos <br>Elemental 3 times. Your reward point tally is 914.";
@@ -417,4 +418,17 @@ public class SlayerPluginTest
assertEquals(41, slayerPlugin.getAmount());
assertEquals(1, slayerPlugin.getExpeditiousChargeCount());
}
@Test
public void testCombatBraceletUpdate()
{
slayerPlugin.setTaskName("Suqahs");
slayerPlugin.setAmount(231);
ChatMessage chatMessage = new ChatMessage(SERVER, "", TASK_UPDATE_COMBAT_BRACELET, null);
slayerPlugin.onChatMessage(chatMessage);
assertEquals("Suqahs", slayerPlugin.getTaskName());
assertEquals(30, slayerPlugin.getAmount());
}
}