@Test void shouldNotContainNoIssuesSinceLabelWhenBuildIsYounger() { AnalysisResult analysisResult = createAnalysisResult(EMPTY_ORIGINS, 0, 0, EMPTY_ERRORS, 0); when(analysisResult.getTotalSize()).thenReturn(0); when(analysisResult.getBuild()).thenReturn(new Build(1)); when(analysisResult.getNoIssuesSinceBuild()).thenReturn(3); String createdHtml = createSummary(analysisResult).create(); assertThat(createdHtml).doesNotContain("No warnings for"); assertThat(createdHtml).contains("No warnings"); }
public String create() { return div(labelProvider.getTitle(analysisResult, !analysisResult.getErrorMessages().isEmpty()), createDescription()) .withId(labelProvider.getId() + "-summary") .renderFormatted(); }
Summary { public String create() { return div(labelProvider.getTitle(analysisResult, !analysisResult.getErrorMessages().isEmpty()), createDescription()) .withId(labelProvider.getId() + "-summary") .renderFormatted(); } }
Summary { public String create() { return div(labelProvider.getTitle(analysisResult, !analysisResult.getErrorMessages().isEmpty()), createDescription()) .withId(labelProvider.getId() + "-summary") .renderFormatted(); } Summary(final StaticAnalysisLabelProvider labelProvider, final AnalysisResult result); @VisibleForTesting  Summary(final StaticAnalysisLabelProvider labelProvider, final AnalysisResult result,
            final LabelProviderFactoryFacade facade); }
Summary { public String create() { return div(labelProvider.getTitle(analysisResult, !analysisResult.getErrorMessages().isEmpty()), createDescription()) .withId(labelProvider.getId() + "-summary") .renderFormatted(); } Summary(final StaticAnalysisLabelProvider labelProvider, final AnalysisResult result); @VisibleForTesting  Summary(final StaticAnalysisLabelProvider labelProvider, final AnalysisResult result,
            final LabelProviderFactoryFacade facade); String create(); }
Summary { public String create() { return div(labelProvider.getTitle(analysisResult, !analysisResult.getErrorMessages().isEmpty()), createDescription()) .withId(labelProvider.getId() + "-summary") .renderFormatted(); } Summary(final StaticAnalysisLabelProvider labelProvider, final AnalysisResult result); @VisibleForTesting  Summary(final StaticAnalysisLabelProvider labelProvider, final AnalysisResult result,
            final LabelProviderFactoryFacade facade); String create();  }