org.kuali.rice.krad.service
Class InactivateableFromToServiceTest

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.rice.krad.test.KRADTestCase
                          extended by org.kuali.rice.krad.service.InactivateableFromToServiceTest
All Implemented Interfaces:
MethodAware

@PerTestUnitTestData(value=@UnitTestData(order={SQL_STATEMENTS,SQL_FILES},sqlStatements=@UnitTestSql(value="delete from trv_acct_use_rt_t"),sqlFiles=@UnitTestFile(filename="classpath:testAccountUseRate.sql",delimiter=";")),
                     tearDown=@UnitTestData(sqlStatements=@UnitTestSql(value="delete from trv_acct_use_rt_t")))
public class InactivateableFromToServiceTest
extends KRADTestCase

Test case for InactivateableFromToService. Note on usage that the tests sets the activeAsOfDate so that the results will be consistent over time. However this is not necessary and the service will default to using the current date if not given.

See Also:
InactivateableFromToService

Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.krad.test.KRADTestCase
KRADTestCase.BootstrapTest, KRADTestCase.Legacy
 
Nested classes/interfaces inherited from class org.kuali.rice.test.BaselineTestCase
BaselineTestCase.BaselineMode, BaselineTestCase.Mode
 
Field Summary
 
Fields inherited from class org.kuali.rice.krad.test.KRADTestCase
dd, kradTestHarnessSpringResourceLoader
 
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
InactivateableFromToServiceTest()
           
 
Method Summary
protected  TravelAccountUseRate constructUseRate(String id, String number, String fromDate, String toDate)
           
protected
<T> Collection<T>
findCollectionBySearchUnbounded(Class<T> clazz, Map<String,String> formProps)
           
protected  InactivateableFromToService getInactivateableFromToService()
           
 void testFilterOutNonActive()
          Test for the filterOutNonActive method
 void testFilterOutNonCurrent()
          Test for the filterOutNonCurrent method
 void testFindMatchingActive_inactive()
          Test finding inactive records through LookupService
 void testFindMatchingActive_nullBeginDate()
          Test query results when begin date is null
 void testFindMatchingActive_nullBeginEndDate()
          Test query results when the begin and end date is null
 void testFindMatchingActive_nullEndDate()
          Test query results when end date is null
 void testFindMatchingActive()
          Test finding active records
 void testFindMatchingCurrent()
          Test finding current records through the findMatchingCurrent method
 void testFindMatchingNonCurrent()
          Test that finding non-current records is the same as finding active with current filtered
 
Methods inherited from class org.kuali.rice.krad.test.KRADTestCase
getKRADTestHarnessContext, getLoadApplicationLifecycle, getSuiteLifecycles, getTestDictionaryObject, loadSuiteTestData, setUp, setUpInternal, setUpLegacyContext, tearDown, tearDownLegacyContext
 
Methods inherited from class org.kuali.rice.test.BaselineTestCase
getClearDbPerTestLifecycles, getMode, getPerTestLifecycles, getPerTestTablesNotToClear, getPerTestTablesToClear, getRollbackClearDbPerTestLifecycles, getRollbackTestLifecycles
 
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, getConfigLocations, getFullTestName, getModuleTestConfigLocation, getRiceMasterDefaultConfigFile, getTestHarnessConfig, getTestHarnessSpringBeansLocation, getTestHarnessSpringResourceLoader, getUserDir, loadPerTestData, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, startLifecycles, startSuiteDataLoaderLifecycles, stopLifecycles
 
Methods inherited from class org.kuali.rice.test.BaseRiceTestCase
getName, getPerTestDataLoaderLifecycle, getTestMethod, resetLogLevels, setLogLevel, setName, setTestMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InactivateableFromToServiceTest

public InactivateableFromToServiceTest()
Method Detail

findCollectionBySearchUnbounded

protected <T> Collection<T> findCollectionBySearchUnbounded(Class<T> clazz,
                                                            Map<String,String> formProps)

getInactivateableFromToService

protected InactivateableFromToService getInactivateableFromToService()

testFindMatchingActive

public void testFindMatchingActive()
                            throws Exception
Test finding active records

Throws:
Exception
See Also:
InactivateableFromToService.findMatchingActive(Class, Map)

testFindMatchingActive_inactive

public void testFindMatchingActive_inactive()
                                     throws Exception
Test finding inactive records through LookupService

Throws:
Exception

testFindMatchingActive_nullBeginDate

public void testFindMatchingActive_nullBeginDate()
                                          throws Exception
Test query results when begin date is null

Throws:
Exception
See Also:
InactivateableFromToService.findMatchingActive(Class, Map)

testFindMatchingActive_nullEndDate

public void testFindMatchingActive_nullEndDate()
                                        throws Exception
Test query results when end date is null

Throws:
Exception
See Also:
InactivateableFromToService.findMatchingActive(Class, Map)

testFindMatchingActive_nullBeginEndDate

public void testFindMatchingActive_nullBeginEndDate()
                                             throws Exception
Test query results when the begin and end date is null

Throws:
Exception
See Also:
InactivateableFromToService.findMatchingActive(Class, Map)

testFilterOutNonActive

public void testFilterOutNonActive()
                            throws Exception
Test for the filterOutNonActive method

Throws:
Exception
See Also:
InactivateableFromToService.filterOutNonActive(List)

testFindMatchingCurrent

public void testFindMatchingCurrent()
                             throws Exception
Test finding current records through the findMatchingCurrent method

Throws:
Exception
See Also:
InactivateableFromToService.findMatchingCurrent(Class, Map)

testFindMatchingNonCurrent

public void testFindMatchingNonCurrent()
                                throws Exception
Test that finding non-current records is the same as finding active with current filtered

Throws:
Exception
See Also:
InactivateableFromToService.findMatchingCurrent(Class, Map)

testFilterOutNonCurrent

public void testFilterOutNonCurrent()
                             throws Exception
Test for the filterOutNonCurrent method

Throws:
Exception
See Also:
InactivateableFromToService.filterOutNonCurrent(List)

constructUseRate

protected TravelAccountUseRate constructUseRate(String id,
                                                String number,
                                                String fromDate,
                                                String toDate)
                                         throws Exception
Throws:
Exception


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.