use of com.faforever.server.game.AiOptionReport in project faf-java-server by FAForever.
the class V2ClientMessageTransformerTest method aiOption.
@Test
public void aiOption() throws Exception {
ClientMessage result = instance.transform(write(new AiOptionClientMessage("junit", "team", "1")));
assertThat(result, is(new AiOptionReport("junit", "team", "1")));
}
use of com.faforever.server.game.AiOptionReport in project faf-java-server by FAForever.
the class GameServiceActivatorsTest method updateAiOption.
@Test
public void updateAiOption() throws Exception {
instance.updateAiOption(new AiOptionReport("ai", "key", "value"), clientConnection.getAuthentication());
verify(gameService).updateAiOption(player, "ai", "key", "value");
}
use of com.faforever.server.game.AiOptionReport in project faf-java-server by FAForever.
the class LegacyRequestTransformerTest method transformAiOption.
@Test
public void transformAiOption() throws Exception {
AiOptionReport aiOptionReport = (AiOptionReport) instance.transform(ImmutableMap.of(KEY_COMMAND, "AIOption", KEY_ARGS, Arrays.asList("QAI", "Faction", 3)));
assertThat(aiOptionReport, is(notNullValue()));
assertThat(aiOptionReport.getAiName(), is("QAI"));
assertThat(aiOptionReport.getKey(), is("Faction"));
assertThat(aiOptionReport.getValue(), is(3));
}
use of com.faforever.server.game.AiOptionReport in project faf-java-server by FAForever.
the class LegacyRequestTransformerTest method aiOption.
@Test
public void aiOption() throws Exception {
AiOptionReport report = (AiOptionReport) instance.transform(ImmutableMap.of(KEY_COMMAND, "AIOption", KEY_ARGS, Arrays.asList("QAI", "Team", 1)));
assertThat(report.getAiName(), is("QAI"));
assertThat(report.getKey(), is("Team"));
assertThat(report.getValue(), is(1));
}
Aggregations