org.apache.commons.beanutils.converters
Class DateConverterTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.beanutils.converters.DateConverterTestBase
              extended by org.apache.commons.beanutils.converters.DateConverterTestCase
All Implemented Interfaces:
junit.framework.Test

public class DateConverterTestCase
extends DateConverterTestBase

Test Case for the DateConverter class.

Version:
$Revision: 471352 $

Constructor Summary
DateConverterTestCase(String name)
          Construct a new Date test case.
 
Method Summary
protected  Class getExpectedType()
          Return the expected type
protected  DateTimeConverter makeConverter()
          Create the Converter with no default value.
protected  DateTimeConverter makeConverter(Object defaultValue)
          Create the Converter with a default value.
 void setUp()
          Set Up
static junit.framework.TestSuite suite()
          Create Test Suite
 void tearDown()
          Tear Down
protected  Object toType(Calendar value)
          Convert from a Calendar to the appropriate Date type
 
Methods inherited from class org.apache.commons.beanutils.converters.DateConverterTestBase
getTimeInMillis, invalidConversion, stringConversion, testConvertDate, testConvertNull, testDefaultStringToTypeConvert, testDefaultType, testInvalidType, testLocale, testMultiplePatterns, testPatternDefault, testPatternNoDefault, testPatternNullDefault, testStringConversion, toCalendar, toDate, toSqlDate, toSqlTime, toSqlTimestamp, toType, validConversion
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateConverterTestCase

public DateConverterTestCase(String name)
Construct a new Date test case.

Parameters:
name - Test Name
Method Detail

suite

public static junit.framework.TestSuite suite()
Create Test Suite

Returns:
test suite

setUp

public void setUp()
           throws Exception
Set Up

Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Tear Down

Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

makeConverter

protected DateTimeConverter makeConverter()
Create the Converter with no default value.

Specified by:
makeConverter in class DateConverterTestBase
Returns:
A new Converter

makeConverter

protected DateTimeConverter makeConverter(Object defaultValue)
Create the Converter with a default value.

Specified by:
makeConverter in class DateConverterTestBase
Parameters:
defaultValue - The default value
Returns:
A new Converter

getExpectedType

protected Class getExpectedType()
Return the expected type

Specified by:
getExpectedType in class DateConverterTestBase
Returns:
The expected type

toType

protected Object toType(Calendar value)
Convert from a Calendar to the appropriate Date type

Specified by:
toType in class DateConverterTestBase
Parameters:
value - The Calendar value to convert
Returns:
The converted value


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.