com.jrefinery.data.junit
Class WeekTests

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

public class WeekTests
extends junit.framework.TestCase

Tests for the Week class.


Field Summary
protected  Week w1_1900
           
protected  Week w2_1900
           
protected  Week w51_9999
           
protected  Week w52_9999
           
 
Constructor Summary
WeekTests(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 testEquals()
           
 void testW1_1900_next()
          Request the week after week 1, 1900: it should be week 2, 1900.
 void testW1_1900_previous()
          Request the week before week 1, 1900: it should be null.
 void testW52_9999_next()
          Request the week after w52, 9999: it should be null.
 void testW52_9999_previous()
          Request the week before w52, 9999: it should be week 51, 9999.
 
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

w1_1900

protected Week w1_1900

w2_1900

protected Week w2_1900

w51_9999

protected Week w51_9999

w52_9999

protected Week w52_9999
Constructor Detail

WeekTests

public WeekTests(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

testEquals

public void testEquals()

testW1_1900_previous

public void testW1_1900_previous()
Request the week before week 1, 1900: it should be null.


testW1_1900_next

public void testW1_1900_next()
Request the week after week 1, 1900: it should be week 2, 1900.


testW52_9999_previous

public void testW52_9999_previous()
Request the week before w52, 9999: it should be week 51, 9999.


testW52_9999_next

public void testW52_9999_next()
Request the week after w52, 9999: it should be null.



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.