Add support for parsing Wilderness assignment updates to slayer plugin (#5757)

Fixes #5687
This commit is contained in:
robinwithes
2018-10-03 15:00:20 +02:00
committed by Tomas Slusny
parent 13a85f39ea
commit 2adb760f02
2 changed files with 22 additions and 2 deletions

View File

@@ -55,6 +55,8 @@ public class SlayerPluginTest
{
private static final String TASK_NEW = "Your new task is to kill 231 Suqahs.";
private static final String TASK_NEW_NPC_CONTACT = "Excellent, you're doing great. Your new task is to kill<br>211 Suqahs.";
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_BOSS_NEW = "Excellent. You're now assigned to kill Vet'ion 3 times.<br>Your reward point tally is 914.";
@@ -164,6 +166,24 @@ public class SlayerPluginTest
assertEquals(914, slayerPlugin.getPoints());
}
@Test
public void testCheckSlayerGem()
{
ChatMessage chatMessageEvent = new ChatMessage(SERVER, "", TASK_CHECKSLAYERGEM, null);
slayerPlugin.onChatMessage(chatMessageEvent);
assertEquals("Suqahs", slayerPlugin.getTaskName());
assertEquals(211, slayerPlugin.getAmount());
}
@Test
public void testCheckSlayerGemWildernessTask()
{
ChatMessage chatMessageEvent = new ChatMessage(SERVER, "", TASK_CHECKSLAYERGEM_WILDERNESS, null);
slayerPlugin.onChatMessage(chatMessageEvent);
assertEquals("Suqahs", slayerPlugin.getTaskName());
assertEquals(211, slayerPlugin.getAmount());
}
@Test
public void testExistingTask()
{