org.kuali.rice.kew.docsearch.xml
Class StandardGenericXMLSearchableAttributeRangesTest

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.kew.test.KEWTestCase
                          extended by org.kuali.rice.kew.docsearch.DocumentSearchTestBase
                              extended by org.kuali.rice.kew.docsearch.xml.StandardGenericXMLSearchableAttributeRangesTest
All Implemented Interfaces:
MethodAware

public class StandardGenericXMLSearchableAttributeRangesTest
extends DocumentSearchTestBase

Tests the StandardGenericXMLSearchableAttribute. KULWF-654: Tests the resolution to this issue by configuring a CustomActionListAttribute as well as a searchable attribute.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.kew.test.KEWTestCase
KEWTestCase.ClearCacheLifecycle
 
Nested classes/interfaces inherited from class org.kuali.rice.test.BaselineTestCase
BaselineTestCase.BaselineMode, BaselineTestCase.Mode
 
Field Summary
 
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
StandardGenericXMLSearchableAttributeRangesTest()
           
 
Method Summary
protected  RemotableAttributeError assertDocumentSearchCriteriaValidation(StandardGenericXMLSearchableAttribute attribute, ExtensionDefinition ed, String attrkey, String attrvalue, boolean expectError)
          Helper to assert document search criteria validation
protected  void assertRangeSearchResults(String docType, String userId, String attrKey, String lowerBound, String upperBound, boolean upperBoundInclusive, int expected)
          Helper that asserts range search results
protected static ExtensionDefinition createExtensionDefinition(String attrName)
          Creates an ExtensionDefinition for the specified attribute with XML config pulled from the db
protected  void loadTestData()
           
 void retrieveDocSearchSvc()
           
protected  WorkflowDocument setUpSearchableDoc()
          Sets up a doc for searching with ranged queries
 void testDateRanges()
           
 void testFloatRanges()
           
 void testLongRanges()
           
 void testRangeDefinitionStringAttributes()
           
 void testSearchableAttributeRanges()
          Test searching by searchable attributes that use ranges
 void testStringRanges()
           
 void testValidateUserSearchRangeInputs()
           
 
Methods inherited from class org.kuali.rice.kew.docsearch.DocumentSearchTestBase
addSearchableAttribute, addSearchableAttribute, addSearchableAttributeRange, getAttribute
 
Methods inherited from class org.kuali.rice.kew.test.KEWTestCase
clearCacheManagers, getGroupIdForName, getLoadApplicationLifecycle, getPerTestLifecycles, getPerTestTablesNotToClear, getPerTestTablesToClear, getPrincipalIdForName, getPrincipalNameForId, getSuiteLifecycles, getTransactionTemplate, loadDefaultTestData, loadPerTestData, loadSuiteTestData, loadXmlFile, loadXmlFile, loadXmlFileFromFileSystem, loadXmlStream, setUpAfterDataLoad
 
Methods inherited from class org.kuali.rice.test.BaselineTestCase
getClearDbPerTestLifecycles, getMode, 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, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, setUpInternal, 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

StandardGenericXMLSearchableAttributeRangesTest

public StandardGenericXMLSearchableAttributeRangesTest()
Method Detail

loadTestData

protected void loadTestData()
                     throws Exception
Overrides:
loadTestData in class KEWTestCase
Throws:
Exception

retrieveDocSearchSvc

public void retrieveDocSearchSvc()

testValidateUserSearchRangeInputs

public void testValidateUserSearchRangeInputs()

assertDocumentSearchCriteriaValidation

protected RemotableAttributeError assertDocumentSearchCriteriaValidation(StandardGenericXMLSearchableAttribute attribute,
                                                                         ExtensionDefinition ed,
                                                                         String attrkey,
                                                                         String attrvalue,
                                                                         boolean expectError)
Helper to assert document search criteria validation


createExtensionDefinition

protected static ExtensionDefinition createExtensionDefinition(String attrName)
Creates an ExtensionDefinition for the specified attribute with XML config pulled from the db


setUpSearchableDoc

protected WorkflowDocument setUpSearchableDoc()
Sets up a doc for searching with ranged queries


assertRangeSearchResults

protected void assertRangeSearchResults(String docType,
                                        String userId,
                                        String attrKey,
                                        String lowerBound,
                                        String upperBound,
                                        boolean upperBoundInclusive,
                                        int expected)
                                 throws WorkflowServiceErrorException
Helper that asserts range search results

Throws:
WorkflowServiceErrorException

testStringRanges

public void testStringRanges()
                      throws Exception
Throws:
Exception

testLongRanges

public void testLongRanges()
                    throws Exception
Throws:
Exception

testFloatRanges

public void testFloatRanges()
                     throws Exception
Throws:
Exception

testDateRanges

public void testDateRanges()
                    throws Exception
Throws:
Exception

testSearchableAttributeRanges

public void testSearchableAttributeRanges()
                                   throws Exception
Test searching by searchable attributes that use ranges

Throws:
Exception

testRangeDefinitionStringAttributes

public void testRangeDefinitionStringAttributes()
                                         throws Exception
Throws:
Exception


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