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