Search in sources :

Example 1 with RatingService

use of com.faforever.server.rating.RatingService in project faf-java-server by FAForever.

the class MatchMakerServiceTest method setUp.

@Before
public void setUp() throws Exception {
    properties = new ServerProperties();
    FeaturedMod ladder1v1Mod = new FeaturedMod().setTechnicalName("faf");
    when(modService.getFeaturedMod(ladder1v1Mod.getTechnicalName())).thenReturn(Optional.of(ladder1v1Mod));
    when(modService.getLadder1v1()).thenReturn(Optional.of(ladder1v1Mod));
    when(modService.isLadder1v1(ladder1v1Mod)).thenReturn(true);
    when(mapService.getRandomLadderMap()).thenReturn(new MapVersion().setFilename("maps/SCMP_001.zip"));
    when(gameService.createGame(any(), any(), any(), any(), any(), anyInt(), anyInt(), any())).thenReturn(CompletableFuture.completedFuture(new Game().setId(1)));
    RatingService ratingService = new RatingService(properties);
    instance = new MatchMakerService(modService, properties, ratingService, clientService, gameService, mapService, playerService);
}
Also used : Game(com.faforever.server.entity.Game) ServerProperties(com.faforever.server.config.ServerProperties) MapVersion(com.faforever.server.entity.MapVersion) FeaturedMod(com.faforever.server.entity.FeaturedMod) RatingService(com.faforever.server.rating.RatingService) Before(org.junit.Before)

Aggregations

ServerProperties (com.faforever.server.config.ServerProperties)1 FeaturedMod (com.faforever.server.entity.FeaturedMod)1 Game (com.faforever.server.entity.Game)1 MapVersion (com.faforever.server.entity.MapVersion)1 RatingService (com.faforever.server.rating.RatingService)1 Before (org.junit.Before)1