@Test void shouldReturnIdAndDefaultNameIfNoNameIsGiven() { StaticAnalysisLabelProvider emptyNameLabelProvider = new StaticAnalysisLabelProvider(ID, ""); assertThat(emptyNameLabelProvider).hasId(ID); assertThat(emptyNameLabelProvider).hasName(emptyNameLabelProvider.getDefaultName()); StaticAnalysisLabelProvider nullNameLabelProvider = new StaticAnalysisLabelProvider(ID, null); assertThat(nullNameLabelProvider).hasId(ID); assertThat(nullNameLabelProvider).hasName(nullNameLabelProvider.getDefaultName()); StaticAnalysisLabelProvider noNameLabelProvider = new StaticAnalysisLabelProvider(ID); assertThat(noNameLabelProvider).hasId(ID); assertThat(noNameLabelProvider).hasName(noNameLabelProvider.getDefaultName()); }
@VisibleForTesting String getDefaultName() { return Messages.Tool_Default_Name(); }
StaticAnalysisLabelProvider implements DescriptionProvider { @VisibleForTesting String getDefaultName() { return Messages.Tool_Default_Name(); } }
StaticAnalysisLabelProvider implements DescriptionProvider { @VisibleForTesting String getDefaultName() { return Messages.Tool_Default_Name(); } StaticAnalysisLabelProvider(final String id);  StaticAnalysisLabelProvider(final String id, @CheckForNull final String name); @VisibleForTesting  StaticAnalysisLabelProvider(final String id, @CheckForNull final String name, final JenkinsFacade jenkins); }
StaticAnalysisLabelProvider implements DescriptionProvider { @VisibleForTesting String getDefaultName() { return Messages.Tool_Default_Name(); } StaticAnalysisLabelProvider(final String id);  StaticAnalysisLabelProvider(final String id, @CheckForNull final String name); @VisibleForTesting  StaticAnalysisLabelProvider(final String id, @CheckForNull final String name, final JenkinsFacade jenkins); DetailsTableModel getIssuesModel(final Run<?, ?> build, final String url, final Report report); String getId(); String getName(); StaticAnalysisLabelProvider setName(@CheckForNull final String name); @Override String toString(); String getLinkName(); String getTrendName(); String getSmallIconUrl(); String getLargeIconUrl(); ContainerTag getTitle(final AnalysisResult result, final boolean hasErrors); ContainerTag getNewIssuesLabel(final int newSize); ContainerTag getFixedIssuesLabel(final int fixedSize); DomContent getNoIssuesSinceLabel(final int currentBuild, final int noIssuesSinceBuild); DomContent getQualityGateResult(final QualityGateStatus qualityGateStatus); DomContent getQualityGateResult(final QualityGateStatus qualityGateStatus, final boolean hasResetLink); DomContent getReferenceBuild(final Run<?, ?> referenceBuild); String getToolTip(final int numberOfItems); @Override String getDescription(final Issue issue); String getSourceCodeDescription(final Run<?, ?> build, final Issue issue); }
StaticAnalysisLabelProvider implements DescriptionProvider { @VisibleForTesting String getDefaultName() { return Messages.Tool_Default_Name(); } StaticAnalysisLabelProvider(final String id);  StaticAnalysisLabelProvider(final String id, @CheckForNull final String name); @VisibleForTesting  StaticAnalysisLabelProvider(final String id, @CheckForNull final String name, final JenkinsFacade jenkins); DetailsTableModel getIssuesModel(final Run<?, ?> build, final String url, final Report report); String getId(); String getName(); StaticAnalysisLabelProvider setName(@CheckForNull final String name); @Override String toString(); String getLinkName(); String getTrendName(); String getSmallIconUrl(); String getLargeIconUrl(); ContainerTag getTitle(final AnalysisResult result, final boolean hasErrors); ContainerTag getNewIssuesLabel(final int newSize); ContainerTag getFixedIssuesLabel(final int fixedSize); DomContent getNoIssuesSinceLabel(final int currentBuild, final int noIssuesSinceBuild); DomContent getQualityGateResult(final QualityGateStatus qualityGateStatus); DomContent getQualityGateResult(final QualityGateStatus qualityGateStatus, final boolean hasResetLink); DomContent getReferenceBuild(final Run<?, ?> referenceBuild); String getToolTip(final int numberOfItems); @Override String getDescription(final Issue issue); String getSourceCodeDescription(final Run<?, ?> build, final Issue issue);  }