Search in sources :

Example 1 with ServerMessage

use of com.faforever.server.common.ServerMessage in project faf-java-server by FAForever.

the class ClientServiceTest method broadcastPlayerInformation.

@Test
public void broadcastPlayerInformation() throws Exception {
    instance.broadcastMinDelay = Duration.ofMinutes(-1);
    instance.broadcastPlayerInformation(Arrays.asList((Player) new Player().setAvailableAvatars(emptyList()).setId(1), (Player) new Player().setAvailableAvatars(emptyList()).setId(2), (Player) new Player().setAvailableAvatars(emptyList()).setId(3)));
    instance.broadcastDelayedResponses();
    verify(clientGateway).broadcast(serverMessageCaptor.capture());
    ServerMessage message = serverMessageCaptor.getValue();
    assertThat(message, instanceOf(PlayerResponses.class));
}
Also used : Player(com.faforever.server.entity.Player) ServerMessage(com.faforever.server.common.ServerMessage) Test(org.junit.Test)

Aggregations

ServerMessage (com.faforever.server.common.ServerMessage)1 Player (com.faforever.server.entity.Player)1 Test (org.junit.Test)1