chat commands: Add test case for PB without trailing period
This commit is contained in:
committed by
Tomas Slusny
parent
14cd865d07
commit
b559fd859b
@@ -147,6 +147,23 @@ public class ChatCommandsPluginTest
|
||||
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("kree'arra"), eq(79));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPersonalBestNoTrailingPeriod()
|
||||
{
|
||||
final String FIGHT_DURATION = "Fight duration: <col=ff0000>0:59</col>. Personal best: 0:55";
|
||||
|
||||
when(client.getUsername()).thenReturn("Adam");
|
||||
|
||||
// This sets lastBoss
|
||||
ChatMessage chatMessage = new ChatMessage(SERVER, "", "Your Zulrah kill count is: <col=ff0000>4</col>.", null);
|
||||
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||
|
||||
chatMessage = new ChatMessage(SERVER, "", FIGHT_DURATION, null);
|
||||
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||
|
||||
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("zulrah"), eq(55));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNewPersonalBest()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user