|
|
@ -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."); |
|
|
|
} |
|
|
|
|
|
|
|
} |