org.apache.jcs.auxiliary.disk.jdbc.mysql.util
Class ScheduleParserUtilUnitTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jcs.auxiliary.disk.jdbc.mysql.util.ScheduleParserUtilUnitTest
All Implemented Interfaces:
junit.framework.Test

public class ScheduleParserUtilUnitTest
extends junit.framework.TestCase

Unit tests for the schedule parser.

Author:
Aaron Smuts

Constructor Summary
ScheduleParserUtilUnitTest()
           
 
Method Summary
 void testGetDatesMalformedNan()
          Verify that we get an exception for a schedule that has a non numeric item.
 void testGetDatesMalformedNoColon()
          Verify that we get an exception for a single bad date in a list.
 void testGetDatesWithNullInput()
          Verify that we get an exception and not a null pointer for null input.
 void testGetDateWithNullInput()
          Verify that we get an exception and not a null pointer for null input.
 void testGetsDatesMultiple()
          Verify that we get one date for one date.
 void testGetsDatesSingle()
          Verify that we get one date for one date.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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

ScheduleParserUtilUnitTest

public ScheduleParserUtilUnitTest()
Method Detail

testGetDatesWithNullInput

public void testGetDatesWithNullInput()
Verify that we get an exception and not a null pointer for null input.


testGetDateWithNullInput

public void testGetDateWithNullInput()
Verify that we get an exception and not a null pointer for null input.


testGetsDatesSingle

public void testGetsDatesSingle()
                         throws ScheduleFormatException
Verify that we get one date for one date.

Throws:
ScheduleFormatException

testGetsDatesMultiple

public void testGetsDatesMultiple()
                           throws ScheduleFormatException
Verify that we get one date for one date.

Throws:
ScheduleFormatException

testGetDatesMalformedNoColon

public void testGetDatesMalformedNoColon()
Verify that we get an exception for a single bad date in a list.


testGetDatesMalformedNan

public void testGetDatesMalformedNan()
Verify that we get an exception for a schedule that has a non numeric item.



Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.