Search in sources :

Example 1 with GameModsReport

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

the class GameServiceActivatorsTest method updateGameMods.

@Test
public void updateGameMods() throws Exception {
    instance.updateGameMods(new GameModsReport(Arrays.asList("A", "B")), clientConnection.getAuthentication());
    verify(gameService).updateGameMods(player.getCurrentGame(), Arrays.asList("A", "B"));
}
Also used : GameModsReport(com.faforever.server.game.GameModsReport) Test(org.junit.Test)

Example 2 with GameModsReport

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

the class V2ClientMessageTransformerTest method gameMods.

@Test
public void gameMods() throws Exception {
    ClientMessage result = instance.transform(write(new GameModsClientMessage(Arrays.asList("1", "2"))));
    assertThat(result, is(new GameModsReport(Arrays.asList("1", "2"))));
}
Also used : ClientMessage(com.faforever.server.common.ClientMessage) GameModsReport(com.faforever.server.game.GameModsReport) Test(org.junit.Test)

Example 3 with GameModsReport

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

the class LegacyRequestTransformerTest method transformGameMods.

@Test
public void transformGameMods() throws Exception {
    GameModsReport gameModsReport = (GameModsReport) instance.transform(ImmutableMap.of(KEY_COMMAND, "GameMods", KEY_ARGS, Arrays.asList("uids", "1-2-3-4 5-6-7-8")));
    assertThat(gameModsReport, is(notNullValue()));
    assertThat(gameModsReport.getModUids(), contains("1-2-3-4", "5-6-7-8"));
}
Also used : GameModsReport(com.faforever.server.game.GameModsReport) Test(org.junit.Test)

Aggregations

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