use of com.faforever.client.player.Player in project downlords-faf-client by FAForever.
the class AbstractChatTabControllerTest method testPlayerInfo.
@Test
public void testPlayerInfo() throws Exception {
String playerName = "somePlayer";
Player player = new Player(playerName);
when(playerService.getPlayerForUsername(playerName)).thenReturn(player);
WaitForAsyncUtils.waitForAsyncFx(TIMEOUT, () -> instance.playerInfo(playerName));
verify(playerService).getPlayerForUsername(playerName);
}
use of com.faforever.client.player.Player in project downlords-faf-client by FAForever.
the class AbstractChatTabControllerTest method testHidePlayerInfo.
@Test
public void testHidePlayerInfo() throws Exception {
String playerName = "somePlayer";
Player player = new Player(playerName);
when(playerService.getPlayerForUsername(playerName)).thenReturn(player);
WaitForAsyncUtils.waitForAsyncFx(TIMEOUT, () -> {
instance.playerInfo(playerName);
instance.hidePlayerInfo();
});
// I don't see what could be verified here
}
use of com.faforever.client.player.Player in project downlords-faf-client by FAForever.
the class AbstractChatTabControllerTest method getMessageCssClassFriend.
@Test
public void getMessageCssClassFriend() throws Exception {
String playerName = "somePlayer";
Player player = new Player(playerName);
player.setSocialStatus(FRIEND);
when(playerService.getPlayerForUsername(playerName)).thenReturn(player);
assertEquals(instance.getMessageCssClass(playerName), SocialStatus.FRIEND.getCssClass());
}
use of com.faforever.client.player.Player in project downlords-faf-client by FAForever.
the class AbstractChatTabControllerTest method getMessageCssClassSelf.
@Test
public void getMessageCssClassSelf() throws Exception {
String playerName = "junit";
Player player = new Player(playerName);
player.setSocialStatus(SELF);
player.setChatOnly(false);
when(playerService.getPlayerForUsername(playerName)).thenReturn(player);
assertEquals(instance.getMessageCssClass(playerName), SocialStatus.SELF.getCssClass());
}
use of com.faforever.client.player.Player in project downlords-faf-client by FAForever.
the class AbstractChatTabControllerTest method getMessageCssClassFoe.
@Test
public void getMessageCssClassFoe() throws Exception {
String playerName = "somePlayer";
Player player = new Player(playerName);
player.setSocialStatus(FOE);
when(playerService.getPlayerForUsername(playerName)).thenReturn(player);
assertEquals(instance.getMessageCssClass(playerName), SocialStatus.FOE.getCssClass());
}
Aggregations