de.smartics.util.test.util
Class CalendarTestUtils

Package class diagram package CalendarTestUtils
java.lang.Object
  extended by de.smartics.util.test.util.CalendarTestUtils

public final class CalendarTestUtils
     
     
extends Object

Calendar utilities for test cases.

Author:
Robert Reiner

Field Summary
static Date CONSTANT_DATE_1960_04_23
          A constant date that points to 1960, 13rd of April.
static Date CONSTANT_DATE_2008_06_02
          A constant date that points to 2008, 2nd of June.
 
Method Summary
static Date createDate(int index)
          Creates a test date.
static Date createDate(int day, int month, int year)
          Creates a test date.
static Date createDateInFuture()
          Creates a date in the future of today.
static Date createDateInFuture(Date date)
          Creates a date in the future of the given date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSTANT_DATE_1960_04_23

public static final Date CONSTANT_DATE_1960_04_23
A constant date that points to 1960, 13rd of April.


CONSTANT_DATE_2008_06_02

public static final Date CONSTANT_DATE_2008_06_02
A constant date that points to 2008, 2nd of June.

Method Detail

createDate

public static Date createDate(int index)
Creates a test date.

Parameters:
index - adds this number of days to the first day of December, 2007.
Returns:
the date to use in tests.

createDate

public static Date createDate(int day,
                              int month,
                              int year)
Creates a test date.

Parameters:
day - the say of month, starting with 1.
month - the month of the year, starting with 1.
year - the year of the test date.
Returns:
the date to use in tests.

createDateInFuture

public static Date createDateInFuture(Date date)
Creates a date in the future of the given date.

Implementation Notes:
The date is the given day (leap years will expect the previous valid day) next year.
Parameters:
date - the base date to create a date in the future.
Returns:
a date after the given date.

createDateInFuture

public static Date createDateInFuture()
Creates a date in the future of today.

Implementation Notes:
The date is the current day (leap years will expect the previous valid day) next year.
Returns:
a date after today.


Copyright © 2008-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.