@Test void shouldAggregateReportsFromMultipleDirectories() throws URISyntaxException { SensorContextTester context = mockContext(); parser.collect(context, getDirs("multipleDirectories/dir1", "multipleDirectories/dir2"), true); assertThat(context.measures(":ch.hortis.sonar.mvn.mc.MetricsCollectorRegistryTest")).hasSize(5); assertThat(context.measures(":ch.hortis.sonar.mvn.mc.CloverCollectorTest")).hasSize(5); assertThat(context.measures(":ch.hortis.sonar.mvn.mc.CheckstyleCollectorTest")).hasSize(5); assertThat(context.measures(":ch.hortis.sonar.mvn.SonarMojoTest")).hasSize(5); assertThat(context.measures(":ch.hortis.sonar.mvn.mc.JDependsCollectorTest")).hasSize(5); assertThat(context.measures(":ch.hortis.sonar.mvn.mc.JavaNCSSCollectorTest")).hasSize(5); }
public void collect(SensorContext context, List<File> reportsDirs, boolean reportDirSetByUser) { List<File> xmlFiles = getReports(reportsDirs, reportDirSetByUser); if (!xmlFiles.isEmpty()) { parseFiles(context, xmlFiles); } }
SurefireJavaParser { public void collect(SensorContext context, List<File> reportsDirs, boolean reportDirSetByUser) { List<File> xmlFiles = getReports(reportsDirs, reportDirSetByUser); if (!xmlFiles.isEmpty()) { parseFiles(context, xmlFiles); } } }
SurefireJavaParser { public void collect(SensorContext context, List<File> reportsDirs, boolean reportDirSetByUser) { List<File> xmlFiles = getReports(reportsDirs, reportDirSetByUser); if (!xmlFiles.isEmpty()) { parseFiles(context, xmlFiles); } } SurefireJavaParser(JavaResourceLocator javaResourceLocator); }
SurefireJavaParser { public void collect(SensorContext context, List<File> reportsDirs, boolean reportDirSetByUser) { List<File> xmlFiles = getReports(reportsDirs, reportDirSetByUser); if (!xmlFiles.isEmpty()) { parseFiles(context, xmlFiles); } } SurefireJavaParser(JavaResourceLocator javaResourceLocator); void collect(SensorContext context, List<File> reportsDirs, boolean reportDirSetByUser); }
SurefireJavaParser { public void collect(SensorContext context, List<File> reportsDirs, boolean reportDirSetByUser) { List<File> xmlFiles = getReports(reportsDirs, reportDirSetByUser); if (!xmlFiles.isEmpty()) { parseFiles(context, xmlFiles); } } SurefireJavaParser(JavaResourceLocator javaResourceLocator); void collect(SensorContext context, List<File> reportsDirs, boolean reportDirSetByUser);  }