Search in sources :

Example 1 with NewGameInfo

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"));
}
Also used : NewGameInfo(com.faforever.client.game.NewGameInfo) Test(org.junit.Test) AbstractPlainJavaFxTest(com.faforever.client.test.AbstractPlainJavaFxTest)

Aggregations

NewGameInfo (com.faforever.client.game.NewGameInfo)1 AbstractPlainJavaFxTest (com.faforever.client.test.AbstractPlainJavaFxTest)1 Test (org.junit.Test)1