From d62aa243f800a8ab372ad22562f9504bf9fc1540 Mon Sep 17 00:00:00 2001 From: fdai7600 Date: Wed, 7 Feb 2024 15:32:27 +0100 Subject: [PATCH] Test: deleteProfessor Test Added --- src/test/java/org/example/AdministrationTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/org/example/AdministrationTest.java b/src/test/java/org/example/AdministrationTest.java index 26b22f9..c8b7836 100644 --- a/src/test/java/org/example/AdministrationTest.java +++ b/src/test/java/org/example/AdministrationTest.java @@ -72,4 +72,14 @@ class AdministrationTest { assertEquals(student, student2); } + @Test + void deleteProfessor() { + Administration administration = new Administration(); + Professor professor = new Professor("P1002", "Diana", "Professor"); + + administration.addProfessor(professor); + assertTrue(administration.deleteProfessor("P1002")); + assertNull(administration.findProfessorById("P1002")); + } + } \ No newline at end of file