Search in sources :

Example 1 with TeamKillReport

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

the class V2ClientMessageTransformerTest method teamKill.

@Test
public void teamKill() throws Exception {
    ClientMessage result = instance.transform(write(new TeamKillClientMessage(100, 1, "A", 2, "B")));
    assertThat(result, is(new TeamKillReport(Duration.ofSeconds(100), 1, "A", 2, "B")));
}
Also used : TeamKillReport(com.faforever.server.game.TeamKillReport) ClientMessage(com.faforever.server.common.ClientMessage) Test(org.junit.Test)

Example 2 with TeamKillReport

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

the class LegacyRequestTransformerTest method teamKillReport.

@Test
public void teamKillReport() throws Exception {
    TeamKillReport teamKillReport = (TeamKillReport) instance.transform(ImmutableMap.of(KEY_COMMAND, "TeamkillReport", KEY_ARGS, Arrays.asList(1, TEST_USERNAME, 2, "TestNG")));
    assertThat(teamKillReport.getVictimId(), is(1));
    assertThat(teamKillReport.getVictimName(), is(TEST_USERNAME));
    assertThat(teamKillReport.getKillerId(), is(2));
    assertThat(teamKillReport.getKillerName(), is("TestNG"));
}
Also used : TeamKillReport(com.faforever.server.game.TeamKillReport) Test(org.junit.Test)

Aggregations

TeamKillReport (com.faforever.server.game.TeamKillReport)2 Test (org.junit.Test)2 ClientMessage (com.faforever.server.common.ClientMessage)1