@Test public void setSimulationRunMetadata() { presenterSpy.setSimulationRunMetadata(simulationRunMetadataLocal, Type.DMN); verify(presenterSpy, times(1)).populateSummary(eq(availableLocal), eq(executedLocal), eq(coverageLocal)); verify(presenterSpy, times(1)).populateList(eq(outputCounterLocal)); verify(presenterSpy, times(1)).populateScenarioList(eq(scenarioCounterLocal), eq(Type.DMN)); verify(coverageReportViewMock, times(1)).show(); verify(coverageReportViewMock, never()).setEmptyStatusText(anyString()); verify(coverageReportViewMock, never()).hide(); }
protected void setSimulationRunMetadata(SimulationRunMetadata simulationRunMetadata, Type type) { if (simulationRunMetadata.getAvailable() == 0) { String messageToShow = DMN.equals(type) ? ScenarioSimulationEditorConstants.INSTANCE.noDecisionsAvailable() : ScenarioSimulationEditorConstants.INSTANCE.noRulesAvailable(); view.setEmptyStatusText(messageToShow); view.hide(); return; } view.initText(type); populateSummary(simulationRunMetadata.getAvailable(), simulationRunMetadata.getExecuted(), simulationRunMetadata.getCoveragePercentage()); populateList(simulationRunMetadata.getOutputCounter()); populateScenarioList(simulationRunMetadata.getScenarioCounter(), type); view.show(); }
CoverageReportPresenter extends AbstractSubDockPresenter<CoverageReportView> implements CoverageReportView.Presenter { protected void setSimulationRunMetadata(SimulationRunMetadata simulationRunMetadata, Type type) { if (simulationRunMetadata.getAvailable() == 0) { String messageToShow = DMN.equals(type) ? ScenarioSimulationEditorConstants.INSTANCE.noDecisionsAvailable() : ScenarioSimulationEditorConstants.INSTANCE.noRulesAvailable(); view.setEmptyStatusText(messageToShow); view.hide(); return; } view.initText(type); populateSummary(simulationRunMetadata.getAvailable(), simulationRunMetadata.getExecuted(), simulationRunMetadata.getCoveragePercentage()); populateList(simulationRunMetadata.getOutputCounter()); populateScenarioList(simulationRunMetadata.getScenarioCounter(), type); view.show(); } }
CoverageReportPresenter extends AbstractSubDockPresenter<CoverageReportView> implements CoverageReportView.Presenter { protected void setSimulationRunMetadata(SimulationRunMetadata simulationRunMetadata, Type type) { if (simulationRunMetadata.getAvailable() == 0) { String messageToShow = DMN.equals(type) ? ScenarioSimulationEditorConstants.INSTANCE.noDecisionsAvailable() : ScenarioSimulationEditorConstants.INSTANCE.noRulesAvailable(); view.setEmptyStatusText(messageToShow); view.hide(); return; } view.initText(type); populateSummary(simulationRunMetadata.getAvailable(), simulationRunMetadata.getExecuted(), simulationRunMetadata.getCoveragePercentage()); populateList(simulationRunMetadata.getOutputCounter()); populateScenarioList(simulationRunMetadata.getScenarioCounter(), type); view.show(); } CoverageReportPresenter(); @Inject  CoverageReportPresenter(CoverageReportView view,
                                   CoverageReportDonutPresenter coverageReportDonutPresenter,
                                   CoverageElementPresenter coverageElementPresenter,
                                   CoverageScenarioListPresenter coverageScenarioListPresenter); }
CoverageReportPresenter extends AbstractSubDockPresenter<CoverageReportView> implements CoverageReportView.Presenter { protected void setSimulationRunMetadata(SimulationRunMetadata simulationRunMetadata, Type type) { if (simulationRunMetadata.getAvailable() == 0) { String messageToShow = DMN.equals(type) ? ScenarioSimulationEditorConstants.INSTANCE.noDecisionsAvailable() : ScenarioSimulationEditorConstants.INSTANCE.noRulesAvailable(); view.setEmptyStatusText(messageToShow); view.hide(); return; } view.initText(type); populateSummary(simulationRunMetadata.getAvailable(), simulationRunMetadata.getExecuted(), simulationRunMetadata.getCoveragePercentage()); populateList(simulationRunMetadata.getOutputCounter()); populateScenarioList(simulationRunMetadata.getScenarioCounter(), type); view.show(); } CoverageReportPresenter(); @Inject  CoverageReportPresenter(CoverageReportView view,
                                   CoverageReportDonutPresenter coverageReportDonutPresenter,
                                   CoverageElementPresenter coverageElementPresenter,
                                   CoverageScenarioListPresenter coverageScenarioListPresenter); @PostConstruct void init(); @Override void reset(); @Override void populateCoverageReport(Type type, SimulationRunMetadata simulationRunMetadata); @Override void onDownloadReportButtonClicked(); @Override void setDownloadReportCommand(Command downloadReportCommand); }
CoverageReportPresenter extends AbstractSubDockPresenter<CoverageReportView> implements CoverageReportView.Presenter { protected void setSimulationRunMetadata(SimulationRunMetadata simulationRunMetadata, Type type) { if (simulationRunMetadata.getAvailable() == 0) { String messageToShow = DMN.equals(type) ? ScenarioSimulationEditorConstants.INSTANCE.noDecisionsAvailable() : ScenarioSimulationEditorConstants.INSTANCE.noRulesAvailable(); view.setEmptyStatusText(messageToShow); view.hide(); return; } view.initText(type); populateSummary(simulationRunMetadata.getAvailable(), simulationRunMetadata.getExecuted(), simulationRunMetadata.getCoveragePercentage()); populateList(simulationRunMetadata.getOutputCounter()); populateScenarioList(simulationRunMetadata.getScenarioCounter(), type); view.show(); } CoverageReportPresenter(); @Inject  CoverageReportPresenter(CoverageReportView view,
                                   CoverageReportDonutPresenter coverageReportDonutPresenter,
                                   CoverageElementPresenter coverageElementPresenter,
                                   CoverageScenarioListPresenter coverageScenarioListPresenter); @PostConstruct void init(); @Override void reset(); @Override void populateCoverageReport(Type type, SimulationRunMetadata simulationRunMetadata); @Override void onDownloadReportButtonClicked(); @Override void setDownloadReportCommand(Command downloadReportCommand); static final int DEFAULT_PREFERRED_WIDTH; static final String IDENTIFIER; }