NTUTimetable result = Configurator.configure(confPath);
int expectedSize = 7;
assertNotNull(result);
ArrayList<SemesterTimetable> resultSTs = result.getSemesterTimetables();
assertEquals(expectedSize, resultSTs.size());
SemesterTimetable resultST = null;
for (int i = 0; i < expectedSize; ++i) {
resultST = resultSTs.get(i);
//ObjectPrinter.print(resultST);
assertNotNull(resultST);
assertSame(result, resultST.getNtuTimetable());
ArrayList<Course> cList = resultST.getCourses();
assertNotNull(cList);
int m = cList.size();
for (int j = 0; j < m; ++j) {
Course c = cList.get(j);
System.out.println(c.getCourseName());
ArrayList<ClassTimetable> clList = c.getClassTimetables();
for (int k = 0; k < clList.size(); ++k) {
ClassTimetable cp = clList.get(k);
System.out.println(cp.getClassType());
}
}
System.out.println("\n------------\n");
ArrayList<ClassTimetable> clList = resultST.getClassTimetables();
assertSame(resultST.getClassTimetables(), clList);
for (int j = 0; j < clList.size(); ++j) {
ClassTimetable c = clList.get(j);
//System.out.println(c.getClassType());
}
assertNotNull(resultST.getClassTimetables());
}
}