|
|
@ -139,8 +139,8 @@ class AdministrationTest { |
|
|
|
Admin result = administration.findAdminById("A2001"); |
|
|
|
|
|
|
|
assertNotNull(result, "Admin should be found after being added."); |
|
|
|
assertEquals("A2001", result.getId(), "The ID of the found admin should match."); |
|
|
|
assertEquals("Jane Doe", result.getName(), "The name of the found admin should match."); |
|
|
|
assertEquals("A2001", result.getAdminId(), "The ID of the found admin should match."); |
|
|
|
assertEquals("Jane Doe", result.getAdminName(), "The name of the found admin should match."); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
@ -151,7 +151,7 @@ class AdministrationTest { |
|
|
|
|
|
|
|
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."); |
|
|
|
assertEquals("A2002", result.getAdminId(), "The ID should match the one searched for."); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
@ -167,7 +167,7 @@ class AdministrationTest { |
|
|
|
|
|
|
|
// Now, the student should be found |
|
|
|
assertNotNull(administration.findStudentById("S1001")); |
|
|
|
assertEquals("Alice", administration.findStudentById("S1001").getName()); |
|
|
|
assertEquals("Alice", administration.findStudentById("S1001").getStudentName()); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
@ -205,13 +205,13 @@ class AdministrationTest { |
|
|
|
assertNotNull(retrievedStudent); |
|
|
|
|
|
|
|
// Asserting that the retrieved student's name matches the expected name |
|
|
|
assertEquals("Walter White", retrievedStudent.getName()); |
|
|
|
assertEquals("Walter White", retrievedStudent.getStudentName()); |
|
|
|
|
|
|
|
// Asserting that the retrieved student's ID matches the expected ID |
|
|
|
assertEquals("S123456", retrievedStudent.getId()); |
|
|
|
assertEquals("S123456", retrievedStudent.getStudentId()); |
|
|
|
|
|
|
|
// Asserting that the retrieved student's role matches the expected role |
|
|
|
assertEquals("Student", retrievedStudent.getRole()); |
|
|
|
assertEquals("Student", retrievedStudent.getStudentRole()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|