JaCoCoSensor implements Sensor { @Override public void execute(SensorContext context) { if (shouldExecuteOnProject()) { new UnitTestsAnalyzer().analyse(context); } } JaCoCoSensor(JaCoCoConfiguration configuration, GroovyFileSystem fileSystem, PathResolver pathResolver, Settings settings); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context);  }
@Test public void test_read_execution_data_with_jacoco_0_7_4() { when(pathResolver.relativeFile(any(File.class), ArgumentMatchers.endsWith(".exec"))).thenReturn(jacocoExecutionData); SensorContextTester context = SensorContextTester.create(new File("")); sensor.execute(context); verifyMeasures(context); }
@Test public void test_read_execution_data_with_jacoco_0_7_5() throws IOException { File jacocoExecutionData = initWithJaCoCoVersion("JaCoCoSensor_0_7_5"); when(pathResolver.relativeFile(any(File.class), ArgumentMatchers.endsWith(".exec"))).thenReturn(jacocoExecutionData); SensorContextTester context = SensorContextTester.create(new File("")); sensor.execute(context); verifyMeasures(context); }