Search in sources :

Example 1 with GameStateReport

use of com.faforever.server.game.GameStateReport in project faf-java-server by FAForever.

the class V2ClientMessageTransformerTest method gameState.

@Test
public void gameState() throws Exception {
    ClientMessage result = instance.transform(write(new GameStateClientMessage(PlayerGameState.LAUNCHING)));
    assertThat(result, is(new GameStateReport(PlayerGameState.LAUNCHING)));
}
Also used : ClientMessage(com.faforever.server.common.ClientMessage) GameStateReport(com.faforever.server.game.GameStateReport) Test(org.junit.Test)

Example 2 with GameStateReport

use of com.faforever.server.game.GameStateReport in project faf-java-server by FAForever.

the class LegacyRequestTransformerTest method transformGameState.

@Test
public void transformGameState() throws Exception {
    GameStateReport gameStateReport = (GameStateReport) instance.transform(ImmutableMap.of(KEY_COMMAND, "GameState", KEY_ARGS, Collections.singletonList("Lobby")));
    assertThat(gameStateReport, is(notNullValue()));
    assertThat(gameStateReport.getState(), is(PlayerGameState.LOBBY));
}
Also used : GameStateReport(com.faforever.server.game.GameStateReport) Test(org.junit.Test)

Example 3 with GameStateReport

use of com.faforever.server.game.GameStateReport in project faf-java-server by FAForever.

the class GameServiceActivatorsTest method updateGameState.

@Test
public void updateGameState() throws Exception {
    instance.updateGameState(new GameStateReport(PlayerGameState.LAUNCHING), clientConnection.getAuthentication());
    verify(gameService).updatePlayerGameState(PlayerGameState.LAUNCHING, player);
}
Also used : GameStateReport(com.faforever.server.game.GameStateReport) Test(org.junit.Test)

Aggregations

GameStateReport (com.faforever.server.game.GameStateReport)3 Test (org.junit.Test)3 ClientMessage (com.faforever.server.common.ClientMessage)1