JUnitReportBuilder { public List<TestSuiteModel> getProcessedTestSuites() { return processedTestSuites; } JUnitReportBuilder(List<String> xmlReports, String targetBuildPath); List<TestSuiteModel> getProcessedTestSuites(); boolean writeReportsOnDisk(); static String SUITE_OVERVIEW; }
@Test public void processedReportsTest() throws FileNotFoundException, JAXBException { List<String> xmlReports = new ArrayList<>(); String report = this.getClass().getClassLoader().getResource("valid-report-1.xml").getPath(); xmlReports.add(report); JUnitReportBuilder builder = new JUnitReportBuilder(xmlReports, "out"); assertEquals("reports count is not right", 1, builder.getProcessedTestSuites().size()); xmlReports.clear(); builder = new JUnitReportBuilder(xmlReports, "out"); assertEquals("reports count is not right", 0, builder.getProcessedTestSuites().size()); }
@Test public void processedReportsSuitesTest() throws FileNotFoundException, JAXBException { List<String> xmlReports = new ArrayList<>(); String report = this.getClass().getClassLoader().getResource("valid-report-2.xml").getPath(); xmlReports.add(report); JUnitReportBuilder builder = new JUnitReportBuilder(xmlReports, "out"); assertEquals("reports count is not right", 2, builder.getProcessedTestSuites().size()); xmlReports.clear(); builder = new JUnitReportBuilder(xmlReports, "out"); assertEquals("reports count is not right", 0, builder.getProcessedTestSuites().size()); }