@Test void shouldProvideResetAction() { AnalysisResult analysisResult = createAnalysisResult( Maps.fixedSize.of("checkstyle", 15, "pmd", 20), 2, 2, EMPTY_ERRORS, 1); Summary summary = createSummary(analysisResult, true); assertThat(summary.create()).contains( "Quality gate: <img src=\"color\" class=\"icon-blue\" alt=\"Success\" title=\"Success\"> Success " + "<button id=\"test-resetReference\" type=\"button\" class=\"btn btn-outline-primary btn-sm\">Reset quality gate</button>"); }
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();  }