use of com.faforever.server.entity.Game in project faf-java-server by FAForever.
the class ArmyStatisticsServiceTest method setUp.
@Before
@SuppressWarnings("unchecked")
public void setUp() {
instance = new ArmyStatisticsService(achievementService, eventService, clientService, modService);
player = new Player();
player.setLogin("TestUser");
player.setId(42);
game = new Game();
game.setId(1);
unitStats = new ArmyStatistics.CategoryStats().setAir(new ArmyStatistics.UnitStats()).setLand(new ArmyStatistics.UnitStats()).setNaval(new ArmyStatistics.UnitStats()).setExperimental(new ArmyStatistics.UnitStats()).setCdr(new ArmyStatistics.UnitStats()).setTech1(new ArmyStatistics.UnitStats()).setTech2(new ArmyStatistics.UnitStats()).setTech3(new ArmyStatistics.UnitStats()).setEngineer(new ArmyStatistics.UnitStats()).setTransportation(new ArmyStatistics.UnitStats()).setSacu(new ArmyStatistics.UnitStats());
achievementUpdates = new ArrayList<>();
eventUpdates = new ArrayList<>();
doAnswer(invocation -> {
achievementUpdates.addAll((Collection<? extends AchievementUpdate>) invocation.getArguments()[0]);
return CompletableFuture.completedFuture(null);
}).when(achievementService).executeBatchUpdate(any());
doAnswer(invocation -> {
eventUpdates.addAll((Collection<? extends EventUpdate>) invocation.getArguments()[0]);
return CompletableFuture.completedFuture(null);
}).when(eventService).executeBatchUpdate(any());
}
Aggregations