diff --git a/src/test/java/org/example/AdministrationTest.java b/src/test/java/org/example/AdministrationTest.java index 6ec59c3..1eb2203 100644 --- a/src/test/java/org/example/AdministrationTest.java +++ b/src/test/java/org/example/AdministrationTest.java @@ -108,6 +108,15 @@ class AdministrationTest { assertEquals("Jane Doe", result.getName(), "The name of the found admin should match."); } + @Test + void findAdminByIdTest() { + Administration administration = new Administration(); + Admin admin = new Admin("John Doe", "A2002", "Admin"); + administration.addAdmin(admin); + Admin result = administration.findAdminById("A2002"); + assertNotNull(result, "Admin should be found by ID."); + assertEquals("A2002", result.getId(), "The ID should match the one searched for."); + } } \ No newline at end of file