Browse Source

Added test for initializeDummyData in AdministrationTest class

remotes/origin/fdai7780
fdai7887 11 months ago
parent
commit
ec254257f3
  1. 20
      src/test/java/org/example/AdministrationTest.java

20
src/test/java/org/example/AdministrationTest.java

@ -287,4 +287,22 @@ class AdministrationTest {
// Finding the added course // Finding the added course
assertEquals(course, admin.findCourseByID("M101")); 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());
}
}
Loading…
Cancel
Save