diff --git a/src/test/java/org/example/AdministrationTest.java b/src/test/java/org/example/AdministrationTest.java index 9e2fe17..2f744e2 100644 --- a/src/test/java/org/example/AdministrationTest.java +++ b/src/test/java/org/example/AdministrationTest.java @@ -135,4 +135,20 @@ class AdministrationTest { assertEquals("Alice", administration.findStudentById("S1001").getName()); } + @Test + void deleteStudentTest() { + Administration administration = new Administration(); + Student student = new Student("Bob", "S1002", "Student"); + + // Add the student and verify they're added + administration.addStudents(student); + assertNotNull(administration.findStudentById("S1002")); + + // Delete the student + assertTrue(administration.deleteStudents("S1002")); + + // Verify the student is no longer found + assertNull(administration.findStudentById("S1002")); + } + } \ No newline at end of file