com.jrefinery.data.junit
Class DayTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.jrefinery.data.junit.DayTests
All Implemented Interfaces:
junit.framework.Test

public class DayTests
extends junit.framework.TestCase

Tests for the Day class.


Constructor Summary
DayTests(java.lang.String name)
          Constructs a new set of tests.
 
Method Summary
protected  void setUp()
          Common test setup.
static junit.framework.Test suite()
          Returns the tests as a test suite.
 void test1Jan1900_next()
          Set up a day equal to 1 January 1900.
 void test1Jan1900_previous()
          Set up a day equal to 1 January 1900.
 void test31Dec9999_next()
          Set up a day equal to 31 December 9999.
 void test31Dec9999_previous()
          Set up a day equal to 31 December 9999.
 void testDateConstructor1()
          In GMT, the end of 29 Feb 2004 is java.util.Date(1,078,099,199,999L).
 void testDateConstructor2()
          In Helsinki, the end of 29 Feb 2004 is java.util.Date(1,078,091,999,999L).
 void testEquals()
           
 void testEqualsSelf()
          Test that a Day instance is equal to itself.
 void testParseDay()
          Test for date parsing.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DayTests

public DayTests(java.lang.String name)
Constructs a new set of tests.

Parameters:
The - name of the tests.
Method Detail

suite

public static junit.framework.Test suite()
Returns the tests as a test suite.


setUp

protected void setUp()
Common test setup.

Overrides:
setUp in class junit.framework.TestCase

testEqualsSelf

public void testEqualsSelf()
Test that a Day instance is equal to itself. SourceForge Bug ID: 558850.


testEquals

public void testEquals()

testDateConstructor1

public void testDateConstructor1()
In GMT, the end of 29 Feb 2004 is java.util.Date(1,078,099,199,999L). Use this to check the day constructor.


testDateConstructor2

public void testDateConstructor2()
In Helsinki, the end of 29 Feb 2004 is java.util.Date(1,078,091,999,999L). Use this to check the Day constructor.


test1Jan1900_previous

public void test1Jan1900_previous()
Set up a day equal to 1 January 1900. Request the previous day, it should be null.


test1Jan1900_next

public void test1Jan1900_next()
Set up a day equal to 1 January 1900. Request the next day, it should be 2 January 1900.


test31Dec9999_previous

public void test31Dec9999_previous()
Set up a day equal to 31 December 9999. Request the previous day, it should be 30 December 9999.


test31Dec9999_next

public void test31Dec9999_next()
Set up a day equal to 31 December 9999. Request the next day, it should be null.


testParseDay

public void testParseDay()
Test for date parsing.



Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.