@Test void shouldExpandTokenForNewAndFixedWarnings() { IssuesSizeTokenMacro macro = new IssuesSizeTokenMacro(); Run<?, ?> run = createBuildWithActions( createAction("id", "name", 3, 2, 1)); assertThat(expandMacro(macro, run)).isEqualTo("3"); macro.setType(StatisticProperties.NEW.name()); assertThat(expandMacro(macro, run)).isEqualTo("2"); macro.setType(StatisticProperties.FIXED.name()); assertThat(expandMacro(macro, run)).isEqualTo("1"); }
@Parameter public void setType(final String type) { this.type = StatisticProperties.valueOf(type); }
IssuesSizeTokenMacro extends DataBoundTokenMacro { @Parameter public void setType(final String type) { this.type = StatisticProperties.valueOf(type); } }
IssuesSizeTokenMacro extends DataBoundTokenMacro { @Parameter public void setType(final String type) { this.type = StatisticProperties.valueOf(type); }  }
IssuesSizeTokenMacro extends DataBoundTokenMacro { @Parameter public void setType(final String type) { this.type = StatisticProperties.valueOf(type); }  @Parameter void setTool(final String tool); @Parameter void setType(final String type); @Override boolean acceptsMacroName(final String macroName); @Override String evaluate(final AbstractBuild<?, ?> abstractBuild, final TaskListener taskListener,
            final String macroName); @Override String evaluate(final Run<?, ?> run, final FilePath workspace, final TaskListener listener,
            final String macroName); }
IssuesSizeTokenMacro extends DataBoundTokenMacro { @Parameter public void setType(final String type) { this.type = StatisticProperties.valueOf(type); }  @Parameter void setTool(final String tool); @Parameter void setType(final String type); @Override boolean acceptsMacroName(final String macroName); @Override String evaluate(final AbstractBuild<?, ?> abstractBuild, final TaskListener taskListener,
            final String macroName); @Override String evaluate(final Run<?, ?> run, final FilePath workspace, final TaskListener listener,
            final String macroName);  }