/** * Test whether the component is a calendar component. */ public final void testIsNotCalendarComponent() { assertFalse("Component is a calendar component", (component instanceof CalendarComponent)); }
/** * Test whether the component is a calendar component. */ public final void testIsCalendarComponent() { assertTrue("Component is not a calendar component", (component instanceof CalendarComponent)); }
/** * */ public final void testValidationException() { try { component.validate(); fail("ValidationException should be thrown!"); } catch (ValidationException ve) { LOG.debug("Exception caught", ve); } }
public void testCalculateRecurrenceSet() { PeriodList periods = component.calculateRecurrenceSet(period); assertEquals("Wrong number of periods", expectedPeriods.size(), periods.size()); assertEquals(expectedPeriods, periods); }
suite.addTest(new ComponentTest("testCalculateRecurrenceSet", component, new Period(new DateTime(), java.time.Duration.ofDays(1)), new PeriodList())); expectedPeriods.add(new Period("20080606T100000Z/PT2H")); expectedPeriods.add(new Period("20080607T100000Z/PT2H")); suite.addTest(new ComponentTest("testCalculateRecurrenceSet", component, new Period(new DateTime("20080601T000000Z"), java.time.Duration.ofDays(7)), expectedPeriods)); expectedPeriods.add(new Period("20080622T000000Z/P1D")); expectedPeriods.add(new Period("20080629T000000Z/P1D")); suite.addTest(new ComponentTest("testCalculateRecurrenceSet", component, new Period(new DateTime("20080601T000000Z"), java.time.Period.ofWeeks(6)), expectedPeriods)); return suite;