예제 #1
0
  @BeforeClass
  public static void setUp() throws InavlidAttributeException, DuplicateAttributeException {
    head = new DepartmentHead("Physics");
    head.addCatalogEntry("Introduction to 20th Century Physics", 1130);
    head.addCourse(1130, 7, Semester.SUMMER, 100, 30);

    School.getInstance().addBuilding("Olin Hall", "OL");
    Building building = School.getInstance().getBuilding("OL");
    building.addClassroom(107, 150);
    building.addClassroom(110, 20);
    building.addOffice(113, false);
  }
예제 #2
0
  /*
   * ADMIN19
   */
  @Test
  public void testCreateRequirementBin()
      throws InavlidAttributeException, InvalidAssignmentException, DuplicateAttributeException {
    School.getInstance()
        .addCatalogEntry("Computer Science", "Accelerated Introduction to Program Design", 1103);
    head.addBin("Physics");
    head.addToBin("Physics", "Computer Science", 1103);

    Bin bin = head.getBin("Physics");
    assertEquals("Physics", bin.getDepartment());
    assertEquals("Physics", bin.getDegree());

    List<CatalogEntry> binCourses = bin.getClasses();
    assertEquals(1, binCourses.size());
    CatalogEntry entry = binCourses.get(0);
    assertEquals("Computer Science", entry.getDepartment());
    assertEquals(1103, entry.getCourseNumber());
    assertEquals("Accelerated Introduction to Program Design", entry.getName());
  }