use of com.faforever.server.game.HostGameResponse in project faf-java-server by FAForever.
the class V2ServerMessageTransformerTest method hostGame.
@Test
public void hostGame() throws Exception {
String response = instance.transform(new HostGameResponse("scmp01"));
assertThat(response, is("{\"data\":{\"mapName\":\"scmp01\"},\"type\":\"hostGame\"}"));
}
use of com.faforever.server.game.HostGameResponse in project faf-java-server by FAForever.
the class ClientServiceTest method hostGame.
@Test
public void hostGame() throws Exception {
Game game = new Game().setId(1).setMapName("SCMP_001");
instance.hostGame(game, player);
ArgumentCaptor<HostGameResponse> captor = ArgumentCaptor.forClass(HostGameResponse.class);
verify(clientGateway).send(captor.capture(), any());
assertThat(captor.getValue().getMapFilename(), is("SCMP_001"));
}
use of com.faforever.server.game.HostGameResponse in project faf-java-server by FAForever.
the class HostGameResponseTransformerTest method transform.
@Test
public void transform() throws Exception {
HostGameResponse response = new HostGameResponse("SCMP_001");
Map<String, Serializable> result = HostGameResponseTransformer.INSTANCE.transform(response);
assertThat(result.get("command"), is("HostGame"));
assertThat(result.get("target"), is("game"));
assertThat(result.get("args"), is(new String[] { "SCMP_001" }));
}
Aggregations