System.out.printf("Statistics written to : %s", outFile.getAbsolutePath());
}
@Test
public void testStageSinglePlanFromFile() throws PlatoException, IOException {
PlanParser parser = new PlanParser();
InputStream in = Thread.currentThread().getContextClassLoader()
.getResourceAsStream("plans/Digital_Preservation_of_Video_Games_DOS.xml");
File userDir = FileUtils.getUserDirectory();
File outFile = new File(userDir, "stage-statistics.csv");
Writer writer = new FileWriter(outFile);
StateChangeLogGenerator statistics = new StateChangeLogGenerator(writer, null);
List<Plan> plans = parser.importProjects(in);
for (Iterator<Plan> iter = plans.iterator(); iter.hasNext();) {
statistics.writeStatistics(iter.next());
}
statistics.endReport();
System.out.printf("Statistics written to : %s", outFile.getAbsolutePath());