/** * Load the test outcomes from a given directory. * * @param reportDirectory An existing directory that contains the test outcomes in XML or JSON format. * @return The full list of test outcomes. * @throws java.io.IOException Thrown if the specified directory was invalid. */ public List<TestOutcome> loadFrom(final File reportDirectory) throws IOException { final AcceptanceTestLoader testOutcomeReporter = getOutcomeReporter(); List<File> reportFiles = getAllOutcomeFilesFrom(reportDirectory); final List<TestOutcome> testOutcomes = Collections.synchronizedList(new ArrayList<TestOutcome>()); for(File reportFile : reportFiles) { testOutcomes.addAll(testOutcomeReporter.loadReportFrom(reportFile).asSet()); } Collections.sort(testOutcomes, byTitle()); return ImmutableList.copyOf(testOutcomes); }
/** * Load the test outcomes from a given directory. * * @param reportDirectory An existing directory that contains the test outcomes in XML or JSON format. * @return The full list of test outcomes. * @throws java.io.IOException Thrown if the specified directory was invalid. */ public List<TestOutcome> loadFrom(final File reportDirectory) throws IOException { final AcceptanceTestLoader testOutcomeReporter = getOutcomeReporter(); List<File> reportFiles = getAllOutcomeFilesFrom(reportDirectory); final List<TestOutcome> testOutcomes = Collections.synchronizedList(new ArrayList<TestOutcome>()); for(File reportFile : reportFiles) { testOutcomes.addAll(testOutcomeReporter.loadReportFrom(reportFile).asSet()); } Collections.sort(testOutcomes, byTitle()); return ImmutableList.copyOf(testOutcomes); }