@Test public void testEmpty() { final HolidayMap aHolidays = new HolidayMap(); final Holidays config = new Holidays(); s_aParser.parse(2011, aHolidays, config); assertTrue("Result is not empty.", aHolidays.isEmpty()); }
@Test public void testInvalid() { final HolidayMap aHolidays = new HolidayMap(); final Holidays config = new Holidays(); final FixedWeekdayRelativeToFixed rule = new FixedWeekdayRelativeToFixed(); rule.setWhich(Which.FIRST); rule.setWeekday(Weekday.MONDAY); rule.setWhen(When.BEFORE); final Fixed fixed = new Fixed(); fixed.setDay(Integer.valueOf(29)); fixed.setMonth(Month.JANUARY); rule.setDay(fixed); config.getFixedWeekdayRelativeToFixed().add(rule); rule.setValidTo(Integer.valueOf(2010)); s_aParser.parse(2011, aHolidays, config); assertTrue("Result is not empty.", aHolidays.isEmpty()); }