Search in sources :

Example 1 with ShowLadderMapsEvent

use of com.faforever.client.main.event.ShowLadderMapsEvent in project downlords-faf-client by FAForever.

the class MapVaultControllerTest method testNotifyPropertyShowLadderInitialized.

@Test
public void testNotifyPropertyShowLadderInitialized() throws Exception {
    List<MapBean> maps = new ArrayList<>();
    for (int i = 0; i < 5; i++) {
        maps.add(MapBeanBuilder.create().defaultValues().displayName("Map " + i).uid(String.valueOf(i)).get());
    }
    when(mapService.getLadderMaps(anyInt(), eq(1))).thenReturn(CompletableFuture.completedFuture(maps));
    instance.display(new ShowLadderMapsEvent());
    WaitForAsyncUtils.waitForFxEvents();
    verify(mapService).getLadderMaps(100, 1);
}
Also used : ArrayList(java.util.ArrayList) ShowLadderMapsEvent(com.faforever.client.main.event.ShowLadderMapsEvent) Test(org.junit.Test) AbstractPlainJavaFxTest(com.faforever.client.test.AbstractPlainJavaFxTest)

Aggregations

ShowLadderMapsEvent (com.faforever.client.main.event.ShowLadderMapsEvent)1 AbstractPlainJavaFxTest (com.faforever.client.test.AbstractPlainJavaFxTest)1 ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1