@Test public void populateSummary() { presenterSpy.populateSummary(availableLocal, executedLocal, coverageLocal); verify(coverageReportViewMock, times(1)).setReportAvailable(eq(availableLocal + "")); verify(coverageReportViewMock, times(1)).setReportExecuted(eq(executedLocal + "")); verify(coverageReportViewMock, times(1)).setReportCoverage(endsWith("%")); int delta = availableLocal - executedLocal; verify(coverageReportDonutPresenterMock, times(1)).showCoverageReport(eq(executedLocal), eq(delta), endsWith("%")); verify(coverageReportDonutPresenterMock, times(1)).manageChartLabels(); }
protected void populateSummary(int available, int executed, double coveragePercentage) { view.setReportAvailable(available + ""); view.setReportExecuted(executed + ""); String coveragePercentageFormatted = numberFormat.format(coveragePercentage); view.setReportCoverage(coveragePercentageFormatted + "%"); coverageReportDonutPresenter.showCoverageReport(executed, available - executed, numberFormatNoDecimal.format(coveragePercentage) + "%"); coverageReportDonutPresenter.manageChartLabels(); }
CoverageReportPresenter extends AbstractSubDockPresenter<CoverageReportView> implements CoverageReportView.Presenter { protected void populateSummary(int available, int executed, double coveragePercentage) { view.setReportAvailable(available + ""); view.setReportExecuted(executed + ""); String coveragePercentageFormatted = numberFormat.format(coveragePercentage); view.setReportCoverage(coveragePercentageFormatted + "%"); coverageReportDonutPresenter.showCoverageReport(executed, available - executed, numberFormatNoDecimal.format(coveragePercentage) + "%"); coverageReportDonutPresenter.manageChartLabels(); } }
CoverageReportPresenter extends AbstractSubDockPresenter<CoverageReportView> implements CoverageReportView.Presenter { protected void populateSummary(int available, int executed, double coveragePercentage) { view.setReportAvailable(available + ""); view.setReportExecuted(executed + ""); String coveragePercentageFormatted = numberFormat.format(coveragePercentage); view.setReportCoverage(coveragePercentageFormatted + "%"); coverageReportDonutPresenter.showCoverageReport(executed, available - executed, numberFormatNoDecimal.format(coveragePercentage) + "%"); coverageReportDonutPresenter.manageChartLabels(); } CoverageReportPresenter(); @Inject  CoverageReportPresenter(CoverageReportView view,
                                   CoverageReportDonutPresenter coverageReportDonutPresenter,
                                   CoverageElementPresenter coverageElementPresenter,
                                   CoverageScenarioListPresenter coverageScenarioListPresenter); }
CoverageReportPresenter extends AbstractSubDockPresenter<CoverageReportView> implements CoverageReportView.Presenter { protected void populateSummary(int available, int executed, double coveragePercentage) { view.setReportAvailable(available + ""); view.setReportExecuted(executed + ""); String coveragePercentageFormatted = numberFormat.format(coveragePercentage); view.setReportCoverage(coveragePercentageFormatted + "%"); coverageReportDonutPresenter.showCoverageReport(executed, available - executed, numberFormatNoDecimal.format(coveragePercentage) + "%"); coverageReportDonutPresenter.manageChartLabels(); } 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 populateSummary(int available, int executed, double coveragePercentage) { view.setReportAvailable(available + ""); view.setReportExecuted(executed + ""); String coveragePercentageFormatted = numberFormat.format(coveragePercentage); view.setReportCoverage(coveragePercentageFormatted + "%"); coverageReportDonutPresenter.showCoverageReport(executed, available - executed, numberFormatNoDecimal.format(coveragePercentage) + "%"); coverageReportDonutPresenter.manageChartLabels(); } 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; }