diff --git a/src/test/java/org/example/AdministrationTest.java b/src/test/java/org/example/AdministrationTest.java index 0397e89..414404f 100644 --- a/src/test/java/org/example/AdministrationTest.java +++ b/src/test/java/org/example/AdministrationTest.java @@ -3,6 +3,7 @@ package org.example; import org.junit.jupiter.api.Test; import java.util.List; +import java.util.Map; import static org.junit.jupiter.api.Assertions.*; @@ -418,4 +419,22 @@ class AdministrationTest { assertEquals("Student",administration.findStudentById("S1010").getStudentRole()); } + @Test + void dropStudentFromCourse() { + Student student = sampleStudent; + Course course = sampleCourse; + admin.addStudents(student); + admin.addCourse(course); + + Map studentCourses = student.getCourseGrades(); + studentCourses.put(course, "Not Graded"); + student.setCourseGrades(studentCourses); + + assertEquals(1, student.courseGrades.size()); + + admin.dropStudentFromCourse("S123456", "M101"); + + assertEquals(0, student.courseGrades.size()); + + } }