|
|
@ -287,4 +287,22 @@ class AdministrationTest { |
|
|
|
// Finding the added course |
|
|
|
assertEquals(course, admin.findCourseByID("M101")); |
|
|
|
} |
|
|
|
} |
|
|
|
@Test |
|
|
|
public void testInitializeDummyData(){ |
|
|
|
admin.initializeDummyData(); |
|
|
|
|
|
|
|
// Check if students are initialized correctly |
|
|
|
assertEquals(2, admin.getStudents().size()); |
|
|
|
|
|
|
|
// Check if professors are initialized correctly |
|
|
|
assertEquals(2, admin.getProfessors().size()); |
|
|
|
|
|
|
|
// Check if admins are initialized correctly |
|
|
|
assertEquals(2, admin.getAdmins().size()); |
|
|
|
|
|
|
|
// Check if courses are initialized correctly |
|
|
|
assertEquals(2, admin.getCourses().size()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |