com.jrefinery.data.junit
Class MonthTests

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

public class MonthTests
extends junit.framework.TestCase

Tests for the Month class.


Field Summary
protected  Month dec_9999
           
protected  Month feb_1900
           
protected  Month jan_1900
           
protected  Month nov_9999
           
 
Constructor Summary
MonthTests(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 testDateConstructor1()
          In GMT, the end of Feb 2000 is java.util.Date(951,868,799,999L).
 void testDateConstructor2()
          In Auckland, the end of Feb 2000 is java.util.Date(951,821,999,999L).
 void testDec_9999_next()
          Set up a month equal to Dec 9999.
 void testDec_9999_previous()
          Set up a month equal to Dec 9999.
 void testEquals()
           
 void testEqualsSelf()
          Test that a Month instance is equal to itself.
 void testJan_1900_next()
          Set up a month equal to Jan 1900.
 void testJan_1900_previous()
          Set up a month equal to Jan 1900.
 void testParseMonth()
          Test the string parsing code...
 
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
 

Field Detail

jan_1900

protected Month jan_1900

feb_1900

protected Month feb_1900

nov_9999

protected Month nov_9999

dec_9999

protected Month dec_9999
Constructor Detail

MonthTests

public MonthTests(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 Month instance is equal to itself. SourceForge Bug ID: 558850.


testEquals

public void testEquals()

testDateConstructor1

public void testDateConstructor1()
In GMT, the end of Feb 2000 is java.util.Date(951,868,799,999L). Use this to check the Month constructor.


testDateConstructor2

public void testDateConstructor2()
In Auckland, the end of Feb 2000 is java.util.Date(951,821,999,999L). Use this to check the Month constructor.


testJan_1900_previous

public void testJan_1900_previous()
Set up a month equal to Jan 1900. Request the previous month, it should be null.


testJan_1900_next

public void testJan_1900_next()
Set up a month equal to Jan 1900. Request the next month, it should be Feb 1900.


testDec_9999_previous

public void testDec_9999_previous()
Set up a month equal to Dec 9999. Request the previous month, it should be Nov 9999.


testDec_9999_next

public void testDec_9999_next()
Set up a month equal to Dec 9999. Request the next month, it should be null.


testParseMonth

public void testParseMonth()
Test the string parsing code...



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.