예제 #1
0
 private void verifyFightRow(Map<String, Object> row, Fight fight) {
   assertThat(row.get("id"), is(fight.getId()));
   assertThat(row.get("attacker_id"), is(fight.getAttackerId()));
   assertThat(row.get("defender_id"), is(fight.getDefenderId()));
   assertThat(row.get("planet_id"), is(fight.getPlanetId()));
   assertThat(row.get("round"), is(fight.getRound()));
   assertThat(row.get("crystals_looted"), is(fight.getLoot().getCrystals()));
   assertThat(row.get("gas_looted"), is(fight.getLoot().getGas()));
 }
예제 #2
0
  @Test
  public void testFindFightsWithPlayerSinceRound2() throws Exception {
    Fight expected = FightScenario.Player1.FIGHT;
    // Find for defender
    List<FightWithPlanetAndPlayer> fight =
        sut.findFightsWithPlayerSinceRound(expected.getDefenderId(), expected.getRound());

    assertThat(fight, hasSize(1));
    assertThat(
        fight.get(0),
        is(
            new FightWithPlanetAndPlayer(
                expected,
                BasicScenario.Player2.Planet1.PLANET,
                BasicScenario.Player1.PLAYER,
                BasicScenario.Player2.PLAYER)));
  }