chatcommands: allow cox pb to look at previous pb times from jagex

This commit is contained in:
melkypie
2020-06-06 23:59:09 +03:00
committed by Adam
parent d3e7998e99
commit 90aa9ecc09
2 changed files with 22 additions and 0 deletions

View File

@@ -410,6 +410,21 @@ public class ChatCommandsPluginTest
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("chambers of xeric"), eq(37 * 60 + 4));
}
@Test
public void testCoXKillUnknownPb()
{
when(configManager.getConfiguration("personalbest.adam", "chambers of xeric", int.class)).thenReturn(25 * 60 + 14);
ChatMessage chatMessage = new ChatMessage(null, FRIENDSCHATNOTIFICATION, "", "<col=ef20ff>Congratulations - your raid is complete!</col><br>Team size: <col=ff0000>3 players</col> Duration:</col> <col=ff0000>23:25</col> Personal best: </col><col=ff0000>20:19</col>", null, 0);
chatCommandsPlugin.onChatMessage(chatMessage);
chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your completed Chambers of Xeric count is: <col=ff0000>52</col>.", null, 0);
chatCommandsPlugin.onChatMessage(chatMessage);
verify(configManager).setConfiguration("killcount.adam", "chambers of xeric", 52);
verify(configManager).setConfiguration("personalbest.adam", "chambers of xeric", 20 * 60 + 19);
}
@Test
public void testCoXKillNoPb()
{