com.jrefinery.data.junit
Class HourTests

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

public class HourTests
extends junit.framework.TestCase

Tests for the Hour class.


Constructor Summary
HourTests(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 4pm on 21 Mar 2002 is java.util.Date(1,014,307,200,000L).
 void testDateConstructor2()
          In Sydney, the 4pm on 21 Mar 2002 is java.util.Date(1,014,267,600,000L).
 void testEquals()
           
 void testEqualsSelf()
          Test that an Hour instance is equal to itself.
 void testFirstHour_next()
          Set up an hour equal to hour zero, 1 January 1900.
 void testFirstHour_previous()
          Set up an hour equal to hour zero, 1 January 1900.
 void testLastHour_next()
          Set up an hour equal to hour zero, 1 January 1900.
 void testLastHour_previous()
          Set up an hour equal to hour zero, 1 January 1900.
 void testParseHour()
          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

HourTests

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


testEquals

public void testEquals()

testDateConstructor1

public void testDateConstructor1()
In GMT, the 4pm on 21 Mar 2002 is java.util.Date(1,014,307,200,000L). Use this to check the hour constructor.


testDateConstructor2

public void testDateConstructor2()
In Sydney, the 4pm on 21 Mar 2002 is java.util.Date(1,014,267,600,000L). Use this to check the hour constructor.


testFirstHour_previous

public void testFirstHour_previous()
Set up an hour equal to hour zero, 1 January 1900. Request the previous hour, it should be null.


testFirstHour_next

public void testFirstHour_next()
Set up an hour equal to hour zero, 1 January 1900. Request the next hour, it should be null.


testLastHour_previous

public void testLastHour_previous()
Set up an hour equal to hour zero, 1 January 1900. Request the previous hour, it should be null.


testLastHour_next

public void testLastHour_next()
Set up an hour equal to hour zero, 1 January 1900. Request the next hour, it should be null.


testParseHour

public void testParseHour()
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.