@Test public void ensureIsNotAllDayForNoonPeriod() { DateMidnight today = DateMidnight.now(); Period period = new Period(today, today, DayLength.NOON); Absence absence = new Absence(person, period, EventType.ALLOWED_APPLICATION, timeConfiguration); Assert.assertFalse("Should be not all day", absence.isAllDay()); }
@Test public void ensureIsAllDayForFullDayPeriod() { DateMidnight start = DateMidnight.now(); DateMidnight end = start.plusDays(2); Period period = new Period(start, end, DayLength.FULL); Absence absence = new Absence(person, period, EventType.ALLOWED_APPLICATION, timeConfiguration); Assert.assertTrue("Should be all day", absence.isAllDay()); }