@Test public void reportNotFound() { tester.settings().setProperty(LuaPlugin.COBERTURA_REPORT_PATH, "/fake/path"); sensor.execute(tester); }
@Override public void execute(SensorContext context) { String reportPath = context.settings().getString(LuaPlugin.COBERTURA_REPORT_PATH); if (reportPath != null) { File xmlFile = getIOFile(context.fileSystem(), reportPath); if (xmlFile.exists()) { LOGGER.info("Analyzing Cobertura report: " + reportPath); CoberturaReportParser.parseReport(xmlFile, context); } else { LOGGER.info("Cobertura xml report not found: " + reportPath); } } else { LOGGER.info("No Cobertura report provided (see '" + LuaPlugin.COBERTURA_REPORT_PATH + "' property)"); } }
CoberturaSensor implements Sensor { @Override public void execute(SensorContext context) { String reportPath = context.settings().getString(LuaPlugin.COBERTURA_REPORT_PATH); if (reportPath != null) { File xmlFile = getIOFile(context.fileSystem(), reportPath); if (xmlFile.exists()) { LOGGER.info("Analyzing Cobertura report: " + reportPath); CoberturaReportParser.parseReport(xmlFile, context); } else { LOGGER.info("Cobertura xml report not found: " + reportPath); } } else { LOGGER.info("No Cobertura report provided (see '" + LuaPlugin.COBERTURA_REPORT_PATH + "' property)"); } } }
CoberturaSensor implements Sensor { @Override public void execute(SensorContext context) { String reportPath = context.settings().getString(LuaPlugin.COBERTURA_REPORT_PATH); if (reportPath != null) { File xmlFile = getIOFile(context.fileSystem(), reportPath); if (xmlFile.exists()) { LOGGER.info("Analyzing Cobertura report: " + reportPath); CoberturaReportParser.parseReport(xmlFile, context); } else { LOGGER.info("Cobertura xml report not found: " + reportPath); } } else { LOGGER.info("No Cobertura report provided (see '" + LuaPlugin.COBERTURA_REPORT_PATH + "' property)"); } }  }
CoberturaSensor implements Sensor { @Override public void execute(SensorContext context) { String reportPath = context.settings().getString(LuaPlugin.COBERTURA_REPORT_PATH); if (reportPath != null) { File xmlFile = getIOFile(context.fileSystem(), reportPath); if (xmlFile.exists()) { LOGGER.info("Analyzing Cobertura report: " + reportPath); CoberturaReportParser.parseReport(xmlFile, context); } else { LOGGER.info("Cobertura xml report not found: " + reportPath); } } else { LOGGER.info("No Cobertura report provided (see '" + LuaPlugin.COBERTURA_REPORT_PATH + "' property)"); } }  @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); }
CoberturaSensor implements Sensor { @Override public void execute(SensorContext context) { String reportPath = context.settings().getString(LuaPlugin.COBERTURA_REPORT_PATH); if (reportPath != null) { File xmlFile = getIOFile(context.fileSystem(), reportPath); if (xmlFile.exists()) { LOGGER.info("Analyzing Cobertura report: " + reportPath); CoberturaReportParser.parseReport(xmlFile, context); } else { LOGGER.info("Cobertura xml report not found: " + reportPath); } } else { LOGGER.info("No Cobertura report provided (see '" + LuaPlugin.COBERTURA_REPORT_PATH + "' property)"); } }  @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context);  }