use of com.faforever.client.game.NewGameInfo in project downlords-faf-client by FAForever.
the class CoopControllerTest method onPlayButtonClicked.
@Test
public void onPlayButtonClicked() {
when(coopService.getMissions()).thenReturn(completedFuture(singletonList(new CoopMission())));
instance.initialize();
WaitForAsyncUtils.waitForFxEvents();
instance.onPlayButtonClicked();
ArgumentCaptor<NewGameInfo> captor = ArgumentCaptor.forClass(NewGameInfo.class);
verify(gameService).hostGame(captor.capture());
NewGameInfo newGameInfo = captor.getValue();
assertThat(newGameInfo.getFeaturedMod().getTechnicalName(), is("coop"));
}
Aggregations