@Test void shouldManageClassesWithDefaultPackage() throws URISyntaxException { SensorContextTester context = SensorContextTester.create(new File("")); context.fileSystem() .add(resource("NoPackagesTest")); collect(context, "/org/sonar/plugins/surefire/SurefireSensorTest/shouldManageClassesWithDefaultPackage/"); assertThat(context.measure(":NoPackagesTest", CoreMetrics.TESTS).value()).isEqualTo(2); }
protected void collect(SensorContext context, List<File> reportsDirs) { LOGGER.info("parsing {}", reportsDirs); surefireJavaParser.collect(context, reportsDirs, settings.hasKey(SurefireUtils.SUREFIRE_REPORT_PATHS_PROPERTY)); }
SurefireSensor implements Sensor { protected void collect(SensorContext context, List<File> reportsDirs) { LOGGER.info("parsing {}", reportsDirs); surefireJavaParser.collect(context, reportsDirs, settings.hasKey(SurefireUtils.SUREFIRE_REPORT_PATHS_PROPERTY)); } }
SurefireSensor implements Sensor { protected void collect(SensorContext context, List<File> reportsDirs) { LOGGER.info("parsing {}", reportsDirs); surefireJavaParser.collect(context, reportsDirs, settings.hasKey(SurefireUtils.SUREFIRE_REPORT_PATHS_PROPERTY)); } SurefireSensor(SurefireJavaParser surefireJavaParser, Configuration settings, FileSystem fs, PathResolver pathResolver); }
SurefireSensor implements Sensor { protected void collect(SensorContext context, List<File> reportsDirs) { LOGGER.info("parsing {}", reportsDirs); surefireJavaParser.collect(context, reportsDirs, settings.hasKey(SurefireUtils.SUREFIRE_REPORT_PATHS_PROPERTY)); } SurefireSensor(SurefireJavaParser surefireJavaParser, Configuration settings, FileSystem fs, PathResolver pathResolver); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); @Override String toString(); }
SurefireSensor implements Sensor { protected void collect(SensorContext context, List<File> reportsDirs) { LOGGER.info("parsing {}", reportsDirs); surefireJavaParser.collect(context, reportsDirs, settings.hasKey(SurefireUtils.SUREFIRE_REPORT_PATHS_PROPERTY)); } SurefireSensor(SurefireJavaParser surefireJavaParser, Configuration settings, FileSystem fs, PathResolver pathResolver); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); @Override String toString();  }