From eb068791f3d4bb1a7753492c87844b7252bfcc3c Mon Sep 17 00:00:00 2001 From: fdai7921 Date: Wed, 7 Feb 2024 15:46:33 +0100 Subject: [PATCH] test: addCourse in Administration class --- src/test/java/org/example/AdministrationTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/org/example/AdministrationTest.java b/src/test/java/org/example/AdministrationTest.java index 26b22f9..e4ac41f 100644 --- a/src/test/java/org/example/AdministrationTest.java +++ b/src/test/java/org/example/AdministrationTest.java @@ -72,4 +72,11 @@ class AdministrationTest { assertEquals(student, student2); } + @Test + void addCourse() { + Administration admin = new Administration(); + Course course = new Course("Math", "M101", 4); + admin.addCourse(course); + assertEquals(course, admin.findCourseByID("M101")); + } } \ No newline at end of file