Browse Source

Test: findAdminByIdTest Test added

remotes/origin/fdai7780
fdai7600 11 months ago
parent
commit
4b91590ea7
  1. 9
      src/test/java/org/example/AdministrationTest.java

9
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."); 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.");
}
} }
Loading…
Cancel
Save