@Test public void should_execute_when_report_path_is_provided() throws Exception { configureReportPaths("my-report"); assertThat(sensor.shouldExecuteOnProject(project)).isTrue(); configureReportPaths(""); configureITReportPaths("my-report"); assertThat(sensor.shouldExecuteOnProject(project)).isTrue(); configureReportPaths(""); configureITReportPaths(""); configureOverallReportPaths("my-report"); assertThat(sensor.shouldExecuteOnProject(project)).isTrue(); configureReportPaths(""); configureITReportPaths(""); configureOverallReportPaths(""); configureUTReportPaths("my-report"); assertThat(sensor.shouldExecuteOnProject(project)).isTrue(); }
@Override public boolean shouldExecuteOnProject(Project project) { return StringUtils.isNotEmpty(coverageReportPath(null)) || StringUtils.isNotEmpty(itReportPath()) || StringUtils.isNotEmpty(overallReportPath()) || StringUtils.isNotEmpty(unitTestReportPath()); }
GenericCoverageSensor implements Sensor { @Override public boolean shouldExecuteOnProject(Project project) { return StringUtils.isNotEmpty(coverageReportPath(null)) || StringUtils.isNotEmpty(itReportPath()) || StringUtils.isNotEmpty(overallReportPath()) || StringUtils.isNotEmpty(unitTestReportPath()); } }
GenericCoverageSensor implements Sensor { @Override public boolean shouldExecuteOnProject(Project project) { return StringUtils.isNotEmpty(coverageReportPath(null)) || StringUtils.isNotEmpty(itReportPath()) || StringUtils.isNotEmpty(overallReportPath()) || StringUtils.isNotEmpty(unitTestReportPath()); } GenericCoverageSensor(Settings settings, FileSystem fs, ResourcePerspectives perspectives); }
GenericCoverageSensor implements Sensor { @Override public boolean shouldExecuteOnProject(Project project) { return StringUtils.isNotEmpty(coverageReportPath(null)) || StringUtils.isNotEmpty(itReportPath()) || StringUtils.isNotEmpty(overallReportPath()) || StringUtils.isNotEmpty(unitTestReportPath()); } GenericCoverageSensor(Settings settings, FileSystem fs, ResourcePerspectives perspectives); @Override boolean shouldExecuteOnProject(Project project); @Override void analyse(Project project, SensorContext context); void analyseWithLogger(SensorContext context, Logger logger); @Override String toString(); }
GenericCoverageSensor implements Sensor { @Override public boolean shouldExecuteOnProject(Project project) { return StringUtils.isNotEmpty(coverageReportPath(null)) || StringUtils.isNotEmpty(itReportPath()) || StringUtils.isNotEmpty(overallReportPath()) || StringUtils.isNotEmpty(unitTestReportPath()); } GenericCoverageSensor(Settings settings, FileSystem fs, ResourcePerspectives perspectives); @Override boolean shouldExecuteOnProject(Project project); @Override void analyse(Project project, SensorContext context); void analyseWithLogger(SensorContext context, Logger logger); @Override String toString();  }