com.ail.commercialtest
Class TestDateOfBirth

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.ail.commercialtest.TestDateOfBirth
All Implemented Interfaces:
junit.framework.Test

public class TestDateOfBirth
extends junit.framework.TestCase

Version:
$Revision: 1.1 $

Constructor Summary
TestDateOfBirth(java.lang.String name)
          Constructs a test case with the given name.
 
Method Summary
static void main(java.lang.String[] args)
          Run this testcase from the command line.
static junit.framework.Test suite()
          Create an instance of this test case as a TestSuite.
 void testAgeCalculations()
          Test DOB calculations.
 void testSetAsStringFormat()
           
 void testStringDobMethods()
          Test that the locale specific text formatting of dates works.
 void testStringDobMethodsSpecificLocale()
          Test that the locale specific text formatting of dates works.
 void testYMDConstructor()
          Test constructor that takes year month day values.
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestDateOfBirth

public TestDateOfBirth(java.lang.String name)
Constructs a test case with the given name.

Parameters:
name - The tests name
Method Detail

suite

public static junit.framework.Test suite()
Create an instance of this test case as a TestSuite.

Returns:
Test an instance of this test case.

main

public static void main(java.lang.String[] args)
Run this testcase from the command line.

Parameters:
args - No command line args are required.

testAgeCalculations

public void testAgeCalculations()
                         throws java.lang.Exception
Test DOB calculations. The Dob class includes functions to calculate age today and age on a date.

Throws:
java.lang.Exception

testYMDConstructor

public void testYMDConstructor()
Test constructor that takes year month day values.


testStringDobMethods

public void testStringDobMethods()
                          throws java.lang.Exception
Test that the locale specific text formatting of dates works.

Throws:
java.lang.Exception

testStringDobMethodsSpecificLocale

public void testStringDobMethodsSpecificLocale()
                                        throws java.lang.Exception
Test that the locale specific text formatting of dates works.

Throws:
java.lang.Exception

testSetAsStringFormat

public void testSetAsStringFormat()
                           throws java.lang.Exception
Throws:
java.lang.Exception