コード例 #1
0
  @Test
  public void test1Class() {
    ScheduleHolder scheduleHolder = new ScheduleHolder();

    List<Course> allCourses = doSetup1();
    scheduleHolder.findAll(allCourses);
    System.out.println(scheduleHolder);

    List<Schedule> allSchedules = scheduleHolder.getAllSchedules();
    assertTrue(allSchedules.size() == 2);
  }
コード例 #2
0
  @Test
  public void testRandomClasses() {
    ScheduleHolder scheduleHolder = new ScheduleHolder();

    List<Course> allCourses = doSetup5();
    scheduleHolder.findAll(allCourses);
    System.out.println(scheduleHolder);

    List<Schedule> allSchedules = scheduleHolder.getAllSchedules();
    System.out.println(allSchedules.size());
    assertTrue(allSchedules.size() == 11); // TODO do full check
  }
コード例 #3
0
  @Test
  public void testImpossibleConflict() {
    ScheduleHolder scheduleHolder = new ScheduleHolder();

    List<Course> allCourses = doSetup4();
    scheduleHolder.findAll(allCourses);
    System.out.println(scheduleHolder);

    List<Schedule> allSchedules = scheduleHolder.getAllSchedules();
    System.out.println(allSchedules.size());
    assertTrue(allSchedules.size() == 0);
  }