コード例 #1
0
 @Test
 public void AddingTeacherResultsInTeacherInPool() {
   String teacherName = "Patrick";
   Teacher newTeacher = new Teacher(teacherName);
   _poolOfTeachers.add(newTeacher);
   ITeacher foundTeacher = _poolOfTeachers.GetTeacher(teacherName);
   assertEquals(teacherName, foundTeacher.getName());
 }
コード例 #2
0
  @Test
  public void AddingTeacherIncreasesNumberOfTeachersByOne() {
    int numberOfTeachersInPool = _poolOfTeachers.GetNumberOfTeachers();

    Teacher newTeacher = new Teacher("anotherTeacher");
    _poolOfTeachers.add(newTeacher);

    int deltaTeachersInPool = _poolOfTeachers.GetNumberOfTeachers() - numberOfTeachersInPool;

    assertEquals(1, deltaTeachersInPool);
  }
コード例 #3
0
 @org.junit.Before
 public void setUp() throws Exception {
   Teacher newTeacher = new Teacher();
   _poolOfTeachers.add(newTeacher);
 }