Пример #1
0
  /*
   * ADMIN17
   */
  @Test
  public void testAssignCourseOfferingToClassroom()
      throws InavlidAttributeException, InvalidAssignmentException, DuplicateAttributeException {
    head.assignCourseToClassroom(7, "OL", 107);

    Course course = head.getCourse(7);
    Building building = course.getBuilding();
    Classroom room = course.getClassroom();
    assertEquals("Olin Hall", building.getName());
    assertEquals("OL", building.getAbbr());
    assertEquals(107, room.getRoomNumber());
    assertEquals(150, room.getCapacity());
  }
Пример #2
0
  /*
   * ADMIN16
   */
  @Test
  public void testAddCourse() throws InavlidAttributeException, DuplicateAttributeException {
    head.addCourse(1130, 6, Semester.SPRING, 50, 20);

    Course course = head.getCourse(6);
    assertEquals("Physics", course.getDepartment());
    assertEquals("Introduction to 20th Century Physics", course.getName());
    assertEquals(1130, course.getCourseNumber());
    assertEquals(6, course.getCRN());
    assertEquals(Semester.SPRING, course.getSemester());
    assertEquals(50, course.getCapacity());
    assertEquals(20, course.getWaitlistCapacity());
  }