Browse Source

Add AdministrationTest Class and added test for findProfessorByID Method

remotes/origin/fdai7780
Tobias Herbert 11 months ago
parent
commit
326fd032bb
  1. 22
      src/test/java/org/example/AdministrationTest.java

22
src/test/java/org/example/AdministrationTest.java

@ -0,0 +1,22 @@
package org.example;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class AdministrationTest {
@Test
void findProfessorById() {
Administration administration = new Administration();
Professor prof1 = new Professor("P1001", "Aaron", "Professor");
administration.addProfessor(prof1);
Professor foundProf1 = administration.findProfessorById("P1001");
assertEquals(prof1, foundProf1);
}
}
Loading…
Cancel
Save