ScenarioSimulationBusinessCentralDocksHandler extends AbstractScenarioSimulationDocksHandler { @Override public Collection<UberfireDock> provideDocks(String perspectiveIdentifier) { Collection<UberfireDock> result = super.provideDocks(perspectiveIdentifier); testRunnedDock = new UberfireDock(UberfireDockPosition.EAST, "PLAY_CIRCLE", new DockPlaceHolderPlace(TEST_RUNNER_REPORTING_PANEL), perspectiveIdentifier); result.add(testRunnedDock.withSize(450).withLabel(ScenarioSimulationEditorConstants.INSTANCE.testReport())); coverageDock = new UberfireDock(UberfireDockPosition.EAST, "BAR_CHART", new DefaultPlaceRequest(CoverageReportPresenter.IDENTIFIER), perspectiveIdentifier); result.add(coverageDock.withSize(450).withLabel(ScenarioSimulationEditorConstants.INSTANCE.coverageReport())); return result; }  @Override Collection<UberfireDock> provideDocks(String perspectiveIdentifier); @Override void expandTestResultsDock(); @Override void resetDocks(); @Override void setScesimEditorId(String scesimEditorId); Optional<CoverageReportView.Presenter> getCoverageReportPresenter(); void updateTestRunnerReportingPanelResult(TestResultMessage testResultMessage); IsWidget getTestRunnerReportingPanelWidget(); static final String TEST_RUNNER_REPORTING_PANEL; }
@Test public void provideDocks() { final Collection<UberfireDock> docks = scenarioSimulationBusinessCentralDocksHandlerSpy.provideDocks("id"); assertEquals(MANAGED_DOCKS.values().length, docks.size()); final UberfireDock testRunnerDock = (UberfireDock) docks.toArray()[MANAGED_DOCKS.REPORT.ordinal()]; assertNotNull(testRunnerDock); assertEquals(TEST_RUNNER_REPORTING_PANEL, testRunnerDock.getPlaceRequest().getParameter("name", "")); assertEquals(ScenarioSimulationEditorConstants.INSTANCE.testReport(), testRunnerDock.getLabel()); assertEquals(UberfireDockPosition.EAST, testRunnerDock.getDockPosition()); assertEquals("PLAY_CIRCLE", testRunnerDock.getIconType()); final UberfireDock coverageDock = (UberfireDock) docks.toArray()[MANAGED_DOCKS.COVERAGE.ordinal()]; assertNotNull(coverageDock); assertEquals(CoverageReportPresenter.IDENTIFIER, coverageDock.getPlaceRequest().getIdentifier()); assertEquals(ScenarioSimulationEditorConstants.INSTANCE.coverageReport(), coverageDock.getLabel()); assertEquals(UberfireDockPosition.EAST, coverageDock.getDockPosition()); assertEquals("BAR_CHART", coverageDock.getIconType()); final UberfireDock cheatSheetDock = (UberfireDock) docks.toArray()[MANAGED_DOCKS.CHEATSHEET.ordinal()]; assertNotNull(cheatSheetDock); assertEquals(CheatSheetPresenter.IDENTIFIER, cheatSheetDock.getPlaceRequest().getIdentifier()); assertEquals(ScenarioSimulationEditorConstants.INSTANCE.scenarioCheatSheet(), cheatSheetDock.getLabel()); assertEquals(UberfireDockPosition.EAST, cheatSheetDock.getDockPosition()); assertEquals("FILE_TEXT", cheatSheetDock.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()); }