Package er.chronic.repeaters

Examples of er.chronic.repeaters.RepeaterDayName.nextSpan()


  public void testNextFuture() {
    Span span;
   
    RepeaterDayName mondays = new RepeaterDayName(RepeaterDayName.DayName.MONDAY);
    mondays.setStart(_now);
    span = mondays.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 21), span.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 22), span.getEndCalendar());

    span = mondays.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 28), span.getBeginCalendar());
View Full Code Here


    mondays.setStart(_now);
    span = mondays.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 21), span.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 22), span.getEndCalendar());

    span = mondays.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 28), span.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 29), span.getEndCalendar());
  }

  public void testNextPast() {
View Full Code Here

  public void testNextPast() {
    Span span;
   
    RepeaterDayName mondays = new RepeaterDayName(RepeaterDayName.DayName.MONDAY);
    mondays.setStart(_now);
    span = mondays.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 14), span.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 15), span.getEndCalendar());

    span = mondays.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 7), span.getBeginCalendar());
View Full Code Here

    mondays.setStart(_now);
    span = mondays.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 14), span.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 15), span.getEndCalendar());

    span = mondays.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 7), span.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 8), span.getEndCalendar());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.