Exemplo n.º 1
0
 public void testCreateDate() {
   Date date = DateUtil.createDate(2000, 1, 1);
   Calendar calendar = new GregorianCalendar();
   calendar.setTime(date);
   assertEquals(2000, calendar.get(Calendar.YEAR));
   assertEquals(1, calendar.get(Calendar.MONTH));
   assertEquals(1, calendar.get(Calendar.DAY_OF_MONTH));
 }
Exemplo n.º 2
0
 public void testCourseDates() {
   Date startDate = DateUtil.createDate(2003, 1, 6);
   Session session = createSession(createCourse(), startDate);
   Date sixteenWeeksOut = createDate(2003, 4, 25);
   assertEquals(sixteenWeeksOut, session.getEndDate());
 }