Package com.mdimension.jchronic.repeaters

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


  public void testNextFuture() {
    RepeaterHour hours = new RepeaterHour();
    hours.setStart(_now);

    Span nextHour = hours.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 16, 15), nextHour.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 16, 16), nextHour.getEndCalendar());

    Span nextNextHour = hours.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 16, 16), nextNextHour.getBeginCalendar());
View Full Code Here


    Span nextHour = hours.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 16, 15), nextHour.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 16, 16), nextHour.getEndCalendar());

    Span nextNextHour = hours.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 16, 16), nextNextHour.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 16, 17), nextNextHour.getEndCalendar());
  }

  public void testNextPast() {
View Full Code Here

  }

  public void testNextPast() {
    RepeaterHour hours = new RepeaterHour();
    hours.setStart(_now);
    Span lastHour = hours.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 16, 13), lastHour.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 16, 14), lastHour.getEndCalendar());

    Span lastLastHour = hours.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 16, 12), lastLastHour.getBeginCalendar());
View Full Code Here

    hours.setStart(_now);
    Span lastHour = hours.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 16, 13), lastHour.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 16, 14), lastHour.getEndCalendar());

    Span lastLastHour = hours.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 16, 12), lastLastHour.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 16, 13), lastLastHour.getEndCalendar());
  }

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