Package com.mdimension.jchronic.repeaters

Examples of com.mdimension.jchronic.repeaters.RepeaterFortnight


    super.setUp();
    _now = Time.construct(2006, 8, 16, 14, 0, 0, 0);
  }

  public void testNextFuture() {
    RepeaterFortnight fortnights = new RepeaterFortnight();
    fortnights.setStart(_now);

    Span nextFortnight = fortnights.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 20), nextFortnight.getBeginCalendar());
    assertEquals(Time.construct(2006, 9, 3), nextFortnight.getEndCalendar());

    Span nextNextFortnight = fortnights.nextSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 9, 3), nextNextFortnight.getBeginCalendar());
    assertEquals(Time.construct(2006, 9, 17), nextNextFortnight.getEndCalendar());
  }
View Full Code Here


    assertEquals(Time.construct(2006, 9, 3), nextNextFortnight.getBeginCalendar());
    assertEquals(Time.construct(2006, 9, 17), nextNextFortnight.getEndCalendar());
  }

  public void testNextPast() {
    RepeaterFortnight fortnights = new RepeaterFortnight();
    fortnights.setStart(_now);
    Span lastFortnight = fortnights.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 7, 30), lastFortnight.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 13), lastFortnight.getEndCalendar());

    Span lastLastFortnight = fortnights.nextSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 7, 16), lastLastFortnight.getBeginCalendar());
    assertEquals(Time.construct(2006, 7, 30), lastLastFortnight.getEndCalendar());
  }
View Full Code Here

    assertEquals(Time.construct(2006, 7, 16), lastLastFortnight.getBeginCalendar());
    assertEquals(Time.construct(2006, 7, 30), lastLastFortnight.getEndCalendar());
  }

  public void testThisFuture() {
    RepeaterFortnight fortnights = new RepeaterFortnight();
    fortnights.setStart(_now);

    Span thisFortnight = fortnights.thisSpan(Pointer.PointerType.FUTURE);
    assertEquals(Time.construct(2006, 8, 16, 15), thisFortnight.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 27), thisFortnight.getEndCalendar());
  }
View Full Code Here

    assertEquals(Time.construct(2006, 8, 16, 15), thisFortnight.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 27), thisFortnight.getEndCalendar());
  }

  public void testThisPast() {
    RepeaterFortnight fortnights = new RepeaterFortnight();
    fortnights.setStart(_now);

    Span thisFortnight = fortnights.thisSpan(Pointer.PointerType.PAST);
    assertEquals(Time.construct(2006, 8, 13, 0), thisFortnight.getBeginCalendar());
    assertEquals(Time.construct(2006, 8, 16, 14), thisFortnight.getEndCalendar());
  }
View Full Code Here

TOP

Related Classes of com.mdimension.jchronic.repeaters.RepeaterFortnight

Copyright © 2018 www.massapicom. 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.