@Test(expected = MojoFailureException.class) public void testCollectReports_addThrows() throws Exception { final File testOutDir = new File(testOutBaseDir, "testCollectReports_addThrows"); FileUtils.deleteDirectory(testOutDir); testOutDir.mkdirs(); VerifyMojo mojo = new VerifyMojo(); final File summaryFile = new File(testOutDir, "summary.json"); final File addSummaryFile = new File(testOutDir, "summary2.json"); addSummaryFile.mkdirs(); mojo.summaryFile = summaryFile; mojo.summaryFiles.add(addSummaryFile); mojo.collectReports(); }
List<CheckReport> collectReports() throws MojoFailureException { List<CheckReport> reports; try { reports = new ArrayList<>(readReportsFromFile(summaryFile)); if (summaryFiles != null) { for (File file : summaryFiles) { reports.addAll(readReportsFromFile(file)); } } } catch (final Exception e) { throw new MojoFailureException("Failed to read check report summary file.", e); } return reports; }
VerifyMojo extends AbstractITestMojo { List<CheckReport> collectReports() throws MojoFailureException { List<CheckReport> reports; try { reports = new ArrayList<>(readReportsFromFile(summaryFile)); if (summaryFiles != null) { for (File file : summaryFiles) { reports.addAll(readReportsFromFile(file)); } } } catch (final Exception e) { throw new MojoFailureException("Failed to read check report summary file.", e); } return reports; } }
VerifyMojo extends AbstractITestMojo { List<CheckReport> collectReports() throws MojoFailureException { List<CheckReport> reports; try { reports = new ArrayList<>(readReportsFromFile(summaryFile)); if (summaryFiles != null) { for (File file : summaryFiles) { reports.addAll(readReportsFromFile(file)); } } } catch (final Exception e) { throw new MojoFailureException("Failed to read check report summary file.", e); } return reports; }  }
VerifyMojo extends AbstractITestMojo { List<CheckReport> collectReports() throws MojoFailureException { List<CheckReport> reports; try { reports = new ArrayList<>(readReportsFromFile(summaryFile)); if (summaryFiles != null) { for (File file : summaryFiles) { reports.addAll(readReportsFromFile(file)); } } } catch (final Exception e) { throw new MojoFailureException("Failed to read check report summary file.", e); } return reports; }   }
VerifyMojo extends AbstractITestMojo { List<CheckReport> collectReports() throws MojoFailureException { List<CheckReport> reports; try { reports = new ArrayList<>(readReportsFromFile(summaryFile)); if (summaryFiles != null) { for (File file : summaryFiles) { reports.addAll(readReportsFromFile(file)); } } } catch (final Exception e) { throw new MojoFailureException("Failed to read check report summary file.", e); } return reports; }    }