|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.jcoderz.commons.types.PeriodTest
public class PeriodTest
Implements test-cases for the Period
class.
| Field Summary | |
|---|---|
static long |
ONE_DAY_IN_MSEC
One day in milli-seconds: 24*60*60*1000. |
static int |
TEN_MSEC
A constant for 10 msec. |
static int |
THIRTY_MSEC
A constant for 30 msec. |
static int |
TWENTY_MSEC
A constant for 20 msec. |
| Constructor Summary | |
|---|---|
PeriodTest()
|
|
| Method Summary | |
|---|---|
void |
testCreateDayPeriod()
Tests the method Period.createDayPeriod(Date). |
void |
testCreateMonthPeriod()
Tests the method Period.createMonthPeriod(Date). |
void |
testDayFactoryMethod()
Test the constructor argument combinations and milli-second resolution. |
void |
testDayPeriodIntersection()
Test the intersection method of the Period class in day resolution. |
void |
testDayPeriodUnion()
Test the union method of the Period class in day resolution. |
void |
testEmptyPeriodUnion()
Test the union method of the Period class in milli-second resolution. |
void |
testFactoryMethods()
Test the constructor argument combinations and milli-second resolution. |
void |
testGetNextPrevPeriodTime()
Test the Period.getNextPeriodStartTime() and
Period.getPrevPeriodEndTime() methods. |
void |
testIsIncludedDayPeriod()
Test the isIncluded() method of the Period class in day resolution. |
void |
testIsIncludedPeriod()
Test the isIncluded() method of the Period class in milli-second resolution. |
void |
testLargestPeriod()
Tries to create a period with the largest possible start and end dates. |
void |
testNext()
Tests the method Period.next(). |
void |
testNextDay()
Tests the methods Period.nextDay() and
Period.nextDay(Date). |
void |
testNextHour()
Tests the methods Period.nextHour() and
Period.nextHour(Date). |
void |
testNextMonth()
Tests the methods Period.nextMonth() and
Period.nextMonth(Date). |
void |
testPeriodIntersection()
Test the intersection method of the Period class in milli-second resolution. |
void |
testPeriodUnion()
Test the union method of the Period class in milli-second resolution. |
void |
testPrevious()
Tests the method Period.previous(). |
void |
testPreviousDay()
Tests the methods Period.previousDay() and
Period.previousDay(Date). |
void |
testPreviousHour()
Tests the methods Period.previousHour() and
Period.previousHour(Date). |
void |
testPreviousMonth()
Tests the methods Period.previousMonth() and
Period.previousDay(Date). |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long ONE_DAY_IN_MSEC
public static final int TEN_MSEC
public static final int TWENTY_MSEC
public static final int THIRTY_MSEC
| Constructor Detail |
|---|
public PeriodTest()
| Method Detail |
|---|
public void testLargestPeriod()
public void testFactoryMethods()
public void testDayFactoryMethod()
public void testCreateDayPeriod()
Period.createDayPeriod(Date).
public void testCreateMonthPeriod()
Period.createMonthPeriod(Date).
public void testPeriodUnion()
public void testEmptyPeriodUnion()
public void testDayPeriodUnion()
public void testPeriodIntersection()
public void testDayPeriodIntersection()
public void testIsIncludedPeriod()
public void testIsIncludedDayPeriod()
public void testGetNextPrevPeriodTime()
Period.getNextPeriodStartTime() and
Period.getPrevPeriodEndTime() methods.
public void testNext()
Period.next().
public void testPrevious()
Period.previous().
public void testNextHour()
Period.nextHour() and
Period.nextHour(Date).
public void testPreviousHour()
Period.previousHour() and
Period.previousHour(Date).
public void testNextDay()
Period.nextDay() and
Period.nextDay(Date).
public void testPreviousDay()
Period.previousDay() and
Period.previousDay(Date).
public void testNextMonth()
Period.nextMonth() and
Period.nextMonth(Date).
public void testPreviousMonth()
Period.previousMonth() and
Period.previousDay(Date).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||