@Test void should_not_count_negative_tests() throws URISyntaxException { SensorContextTester context = mockContext(); parser.collect(context, getDirs("negativeTestTime"), true); assertThat(context.measure(":java.Foo", CoreMetrics.SKIPPED_TESTS).value()).isZero(); assertThat(context.measure(":java.Foo", CoreMetrics.TESTS).value()).isEqualTo(6); assertThat(context.measure(":java.Foo", CoreMetrics.TEST_ERRORS).value()).isZero(); assertThat(context.measure(":java.Foo", CoreMetrics.TEST_FAILURES).value()).isZero(); assertThat(context.measure(":java.Foo", CoreMetrics.TEST_EXECUTION_TIME).value()).isEqualTo(659); }
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);  }