use of com.faforever.client.preferences.Preferences in project downlords-faf-client by FAForever.
the class MapVaultControllerTest method setUp.
@Before
public void setUp() throws Exception {
when(preferencesService.getPreferences()).thenReturn(new Preferences());
instance = new MapVaultController(mapService, i18n, eventBus, preferencesService, uiService, notificationService);
doAnswer(invocation -> {
MapDetailController controller = mock(MapDetailController.class);
when(controller.getRoot()).thenReturn(new Pane());
return controller;
}).when(uiService).loadFxml("theme/vault/map/map_detail.fxml");
doAnswer(invocation -> {
MapCardController controller = mock(MapCardController.class);
when(controller.getRoot()).thenReturn(new Pane());
return controller;
}).when(uiService).loadFxml("theme/vault/map/map_card.fxml");
loadFxml("theme/vault/map/map_vault.fxml", clazz -> {
if (clazz == SearchController.class) {
return searchController;
}
if (clazz == LogicalNodeController.class) {
return logicalNodeController;
}
if (clazz == SpecificationController.class) {
return specificationController;
}
return instance;
});
}
Aggregations