use of com.faforever.server.coop.CoopMissionCompletedReport in project faf-java-server by FAForever.
the class V2ClientMessageTransformerTest method coopMissionCompleted.
@Test
public void coopMissionCompleted() throws Exception {
ClientMessage result = instance.transform(write(new CoopMissionCompletedClientMessage(true, false, 300)));
assertThat(result, is(new CoopMissionCompletedReport(true, false, Duration.ofSeconds(300))));
}
use of com.faforever.server.coop.CoopMissionCompletedReport in project faf-java-server by FAForever.
the class LegacyRequestTransformerTest method transformOperationComplete.
@Test
public void transformOperationComplete() throws Exception {
CoopMissionCompletedReport coopMissionCompletedReport = (CoopMissionCompletedReport) instance.transform(ImmutableMap.of(KEY_COMMAND, "OperationComplete", KEY_ARGS, Arrays.asList(1, 0, 1440)));
assertThat(coopMissionCompletedReport, is(notNullValue()));
assertThat(coopMissionCompletedReport.isPrimaryTargets(), is(true));
assertThat(coopMissionCompletedReport.isSecondaryTargets(), is(false));
assertThat(coopMissionCompletedReport.getTime(), is(Duration.ofSeconds(1440)));
}
Aggregations