return instancesList;
}
@Test
public void testCreateDataFromImport() {
Person t1 = new Person("t1");
Person t2 = new Person("t2");
WinQDCourse course = new WinQDCourse();
course.setShortName("short");
course.setName("long");
// split 5 into 2+2+1
course.setHours(ImportWinQD.getHours(5));
assertEquals(3, course.getHours().size());
course.addInstance("inst1", t1);
course.addInstance("inst2", t2);
Person eckart = new Person("eckart");
Person frido = new Person("frido");
course.getStudents().add(eckart);
course.getStudents().add(frido);
importer.addStudent(eckart);
importer.addStudent(frido);
importer.addTeacher(t1);
importer.addTeacher(t2);
importer.addCourse(course);
importer.initSimpleDao();
importer.fillSimpleDataPool();
importer.addToDataPool();
Dao<Event> eventDao = importer.getDataPool().getDao(Event.class);
Dao<Person> personDao = importer.getDataPool().getDao(Person.class);
Dao<Location> locationDao = importer.getDataPool().getDao(Location.class);
assertTrue(locationDao.getAll().size() > 5);
// 3 appointments * 2 instances
assertEquals(6, eventDao.getAll().size());
assertEquals(4, personDao.getAll().size());
assertEquals(3, frido.getEvents().size());
}