AbstractScenarioSimulationDocksHandler extends AbstractWorkbenchDocksHandler { @Override public Collection<UberfireDock> provideDocks(final String perspectiveIdentifier) { List<UberfireDock> result = new ArrayList<>(); settingsDock = new UberfireDock(UberfireDockPosition.EAST, "SLIDERS", new DefaultPlaceRequest(SettingsPresenter.IDENTIFIER), perspectiveIdentifier); result.add(settingsDock.withSize(450).withLabel(ScenarioSimulationEditorConstants.INSTANCE.settings())); toolsDock = new UberfireDock(UberfireDockPosition.EAST, "INFO_CIRCLE", new DefaultPlaceRequest(TestToolsPresenter.IDENTIFIER), perspectiveIdentifier); result.add(toolsDock.withSize(450).withLabel(ScenarioSimulationEditorConstants.INSTANCE.testTools())); cheatSheetDock = new UberfireDock(UberfireDockPosition.EAST, "FILE_TEXT", new DefaultPlaceRequest(CheatSheetPresenter.IDENTIFIER), perspectiveIdentifier); result.add(cheatSheetDock.withSize(450).withLabel(ScenarioSimulationEditorConstants.INSTANCE.scenarioCheatSheet())); return result; }  @Override Collection<UberfireDock> provideDocks(final String perspectiveIdentifier); void addDocks(); void removeDocks(); void expandToolsDock(); abstract void expandTestResultsDock(); void resetDocks(); void setScesimEditorId(String scesimEditorId); Optional<CheatSheetView.Presenter> getCheatSheetPresenter(); Optional<TestToolsView.Presenter> getTestToolsPresenter(); Optional<SettingsView.Presenter> getSettingsPresenter(); static final String SCESIMEDITOR_ID; }
@Test public void provideDocks() { final Collection<UberfireDock> docks = abstractScenarioSimulationDocksHandlerSpy.provideDocks("id"); assertEquals(MANAGED_DOCKS.values().length, docks.size()); final UberfireDock cheetSheetDock = (UberfireDock) docks.toArray()[MANAGED_DOCKS.CHEATSHEET.ordinal()]; assertNotNull(cheetSheetDock); assertEquals(CheatSheetPresenter.IDENTIFIER, cheetSheetDock.getPlaceRequest().getIdentifier()); assertEquals(ScenarioSimulationEditorConstants.INSTANCE.scenarioCheatSheet(), cheetSheetDock.getLabel()); assertEquals(UberfireDockPosition.EAST, cheetSheetDock.getDockPosition()); assertEquals("FILE_TEXT", cheetSheetDock.getIconType()); final UberfireDock settingsDock = (UberfireDock) docks.toArray()[MANAGED_DOCKS.SETTINGS.ordinal()]; assertNotNull(settingsDock); assertEquals(SettingsPresenter.IDENTIFIER, settingsDock.getPlaceRequest().getIdentifier()); assertEquals(ScenarioSimulationEditorConstants.INSTANCE.settings(), settingsDock.getLabel()); assertEquals(UberfireDockPosition.EAST, settingsDock.getDockPosition()); assertEquals("SLIDERS", settingsDock.getIconType()); final UberfireDock testToolsDock = (UberfireDock) docks.toArray()[MANAGED_DOCKS.TOOLS.ordinal()]; assertNotNull(testToolsDock); assertEquals(TestToolsPresenter.IDENTIFIER, testToolsDock.getPlaceRequest().getIdentifier()); assertEquals(ScenarioSimulationEditorConstants.INSTANCE.testTools(), testToolsDock.getLabel()); assertEquals(UberfireDockPosition.EAST, testToolsDock.getDockPosition()); assertEquals("INFO_CIRCLE", testToolsDock.getIconType()); }