org.kuali.rice.krad.service
Class DateTimeServiceTest

java.lang.Object
  extended by org.kuali.rice.test.BaseRiceTestCase
      extended by org.kuali.rice.test.RiceTestCase
          extended by org.kuali.rice.test.RiceInternalSuiteDataTestCase
              extended by org.kuali.rice.test.BaseModuleTestCase
                  extended by org.kuali.rice.test.BaselineTestCase
                      extended by org.kuali.test.KRADTestCase
                          extended by org.kuali.rice.krad.service.DateTimeServiceTest
All Implemented Interfaces:
MethodAware

public class DateTimeServiceTest
extends KRADTestCase

DateTimeServiceTest tests DateTimeService


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.test.BaselineTestCase
BaselineTestCase.BaselineMode, BaselineTestCase.Mode
 
Field Summary
 
Fields inherited from class org.kuali.test.KRADTestCase
dd
 
Fields inherited from class org.kuali.rice.test.BaselineTestCase
dirty
 
Fields inherited from class org.kuali.rice.test.BaseModuleTestCase
LOG, moduleName
 
Fields inherited from class org.kuali.rice.test.RiceTestCase
DEFAULT_TEST_HARNESS_SPRING_BEANS, failedSuiteTestName, perTestLifeCycles, SUITE_LIFE_CYCLES_FAILED, SUITE_LIFE_CYCLES_RAN, suiteLifeCycles
 
Fields inherited from class org.kuali.rice.test.BaseRiceTestCase
log, method
 
Constructor Summary
DateTimeServiceTest()
           
 
Method Summary
 void testConvertToSqlDate_blankDateString()
          tests DateTimeService.convertToSqlDate(String) with a blank value
 void testConvertToSqlDate_invalidDateString()
          tests DateTimeService.convertToSqlDate(String) with an invalid date string
 void testConvertToSqlDate_validDateString()
          tests DateTimeService.convertToSqlDate(String) with a valid date string
 void testConvertToSqlTimestamp_blankTimeString()
          tests DateTimeService.convertToSqlTimestamp(String) with a null value
 void testConvertToSqlTimestamp_invalidTimeString()
          tests DateTimeService.convertToSqlTimestamp(String) with an invalid time value
 void testConvertToSqlTimestamp_validTimeString()
          tests DateTimeService.convertToSqlTimestamp(String) with a valid time string
 void testDateDiff()
          tests DateTimeService.dateDiff(java.util.Date, java.util.Date, boolean)
 void testGetCurrentCalendar()
          tests DateTimeService.getCurrentCalendar()
 void testGetCurrentDate()
          tests that DateTimeService returns a correct current date
 void testGetCurrentSqlDate()
          tests that DateTimeService returns a correct current SQL date
 void testGetCurrentSqlDateMidnight()
          tests DateTimeService.getCurrentSqlDateMidnight()
 
Methods inherited from class org.kuali.test.KRADTestCase
getLoadApplicationLifecycle, getSuiteLifecycles, getTestDictionaryObject, loadSuiteTestData, setUpInternal
 
Methods inherited from class org.kuali.rice.test.BaselineTestCase
getClearDbPerTestLifecycles, getMode, getPerTestLifecycles, getPerTestTablesNotToClear, getPerTestTablesToClear, getRollbackClearDbPerTestLifecycles, getRollbackTestLifecycles, setUp
 
Methods inherited from class org.kuali.rice.test.BaseModuleTestCase
getModuleName
 
Methods inherited from class org.kuali.rice.test.RiceInternalSuiteDataTestCase
getKIMDataLoadOrderFile, getKIMSqlFileBaseLocation, getKRADDefaultSuiteTestData
 
Methods inherited from class org.kuali.rice.test.RiceTestCase
configureLogging, dumpMemory, getBaseDir, getConfigLocations, getFullTestName, getModuleTestConfigLocation, getRiceMasterDefaultConfigFile, getTestHarnessConfig, getTestHarnessSpringBeansLocation, getTestHarnessSpringResourceLoader, getUserDir, loadPerTestData, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, startLifecycles, startSuiteDataLoaderLifecycles, stopLifecycles, tearDown
 
Methods inherited from class org.kuali.rice.test.BaseRiceTestCase
getName, getPerTestDataLoaderLifecycle, resetLogLevels, setLogLevel, setName, setTestMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeServiceTest

public DateTimeServiceTest()
Method Detail

testGetCurrentDate

public void testGetCurrentDate()
tests that DateTimeService returns a correct current date

See Also:
DateTimeService.getCurrentDate()

testGetCurrentSqlDate

public void testGetCurrentSqlDate()
tests that DateTimeService returns a correct current SQL date

See Also:
DateTimeService.getCurrentSqlDate()

testGetCurrentSqlDateMidnight

public void testGetCurrentSqlDateMidnight()
                                   throws InterruptedException
tests DateTimeService.getCurrentSqlDateMidnight()

Throws:
InterruptedException

testGetCurrentCalendar

public void testGetCurrentCalendar()
tests DateTimeService.getCurrentCalendar()


testConvertToSqlTimestamp_blankTimeString

public void testConvertToSqlTimestamp_blankTimeString()
                                               throws ParseException
tests DateTimeService.convertToSqlTimestamp(String) with a null value

Throws:
ParseException

testConvertToSqlTimestamp_invalidTimeString

public void testConvertToSqlTimestamp_invalidTimeString()
tests DateTimeService.convertToSqlTimestamp(String) with an invalid time value


testConvertToSqlTimestamp_validTimeString

public void testConvertToSqlTimestamp_validTimeString()
                                               throws ParseException
tests DateTimeService.convertToSqlTimestamp(String) with a valid time string

Throws:
ParseException

testConvertToSqlDate_blankDateString

public void testConvertToSqlDate_blankDateString()
                                          throws ParseException
tests DateTimeService.convertToSqlDate(String) with a blank value

Throws:
ParseException

testConvertToSqlDate_invalidDateString

public void testConvertToSqlDate_invalidDateString()
tests DateTimeService.convertToSqlDate(String) with an invalid date string


testConvertToSqlDate_validDateString

public void testConvertToSqlDate_validDateString()
                                          throws ParseException
tests DateTimeService.convertToSqlDate(String) with a valid date string

Throws:
ParseException

testDateDiff

public void testDateDiff()
                  throws ParseException
tests DateTimeService.dateDiff(java.util.Date, java.util.Date, boolean)

Throws:
ParseException


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.