@Test void should_log_missing_resource_with_debug_level() throws Exception { SensorContextTester context = mockContext(); parser = new SurefireJavaParser(mock(JavaResourceLocator.class)); parser.collect(context, getDirs("resourceNotFound"), true); assertThat(logTester.logs(LoggerLevel.WARN)).isEmpty(); assertThat(logTester.logs(LoggerLevel.DEBUG)).contains("Resource not found: org.sonar.Foo"); }
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);  }