@Test public void AddingTeacherResultsInTeacherInPool() { String teacherName = "Patrick"; Teacher newTeacher = new Teacher(teacherName); _poolOfTeachers.add(newTeacher); ITeacher foundTeacher = _poolOfTeachers.GetTeacher(teacherName); assertEquals(teacherName, foundTeacher.getName()); }
@Test public void AddingTeacherIncreasesNumberOfTeachersByOne() { int numberOfTeachersInPool = _poolOfTeachers.GetNumberOfTeachers(); Teacher newTeacher = new Teacher("anotherTeacher"); _poolOfTeachers.add(newTeacher); int deltaTeachersInPool = _poolOfTeachers.GetNumberOfTeachers() - numberOfTeachersInPool; assertEquals(1, deltaTeachersInPool); }
@org.junit.Before public void setUp() throws Exception { Teacher newTeacher = new Teacher(); _poolOfTeachers.add(newTeacher); }