diff --git a/src/test/java/org/example/AdministrationTest.java b/src/test/java/org/example/AdministrationTest.java index 8399712..75cbfc4 100644 --- a/src/test/java/org/example/AdministrationTest.java +++ b/src/test/java/org/example/AdministrationTest.java @@ -8,6 +8,7 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.List; import java.util.Map; +import java.util.Scanner; import static org.junit.jupiter.api.Assertions.*; @@ -514,6 +515,22 @@ class AdministrationTest { } + @Test + void deleteCourseWithInput(){ + Course course = sampleCourse; + admin.addCourse(course); + String courseIDToDelete = course.getCourseID(); + + boolean isDeleted = admin.deleteCourse(courseIDToDelete); + if (isDeleted) { + System.out.println("Course with ID " + courseIDToDelete + " has been successfully deleted."); + } else { + System.out.println("Course with ID " + courseIDToDelete + " not found."); + } + + assertEquals(0, admin.getCourses().size()); + } + }