Search in sources :

Example 1 with DisconnectPeerRequest

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

the class GameServiceActivatorsTest method disconnectFromGame.

@Test
public void disconnectFromGame() throws Exception {
    instance.disconnectFromGame(new DisconnectPeerRequest(13), clientConnection.getAuthentication());
    verify(gameService).disconnectPlayerFromGame(player, 13);
}
Also used : DisconnectPeerRequest(com.faforever.server.game.DisconnectPeerRequest) Test(org.junit.Test)

Example 2 with DisconnectPeerRequest

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

the class V2ClientMessageTransformerTest method disconnectPeer.

@Test
public void disconnectPeer() throws Exception {
    ClientMessage result = instance.transform(write(new DisconnectPeerClientMessage(42)));
    assertThat(result, is(new DisconnectPeerRequest(42)));
}
Also used : ClientMessage(com.faforever.server.common.ClientMessage) DisconnectPeerRequest(com.faforever.server.game.DisconnectPeerRequest) Test(org.junit.Test)

Example 3 with DisconnectPeerRequest

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

the class LegacyRequestTransformerTest method closeFa.

@Test
public void closeFa() throws Exception {
    DisconnectPeerRequest request = (DisconnectPeerRequest) instance.transform(ImmutableMap.of(KEY_COMMAND, COMMAND_ADMIN, KEY_ACTION, "closeFA", "user_id", 1));
    assertThat(request.getPlayerId(), is(1));
}
Also used : DisconnectPeerRequest(com.faforever.server.game.DisconnectPeerRequest) Test(org.junit.Test)

Aggregations

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