Package com.mdimension.jchronic.repeaters

Examples of com.mdimension.jchronic.repeaters.RepeaterWeek.nextSpan()


  public void testNextFuture() {
    RepeaterWeek weeks = new RepeaterWeek();
    weeks.setStart(_now);

    Span nextWeek = weeks.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 20), nextWeek.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 27), nextWeek.getEndCalendar());

    Span nextNextWeek = weeks.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 27), nextNextWeek.getBeginCalendar());
View Full Code Here


    Span nextWeek = weeks.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 20), nextWeek.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 27), nextWeek.getEndCalendar());

    Span nextNextWeek = weeks.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 27), nextNextWeek.getBeginCalendar());
    assertEquals(Time.construct(2006, 9, 3), nextNextWeek.getEndCalendar());
  }

  public void testNextPast() {
View Full Code Here

  }

  public void testNextPast() {
    RepeaterWeek weeks = new RepeaterWeek();
    weeks.setStart(_now);
    Span lastWeek = weeks.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 6), lastWeek.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 13), lastWeek.getEndCalendar());

    Span lastLastWeek = weeks.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 7, 30), lastLastWeek.getBeginCalendar());
View Full Code Here

    weeks.setStart(_now);
    Span lastWeek = weeks.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 6), lastWeek.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 13), lastWeek.getEndCalendar());

    Span lastLastWeek = weeks.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 7, 30), lastLastWeek.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 6), lastLastWeek.getEndCalendar());
  }

  public void testThisFuture() {
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.