org.kuali.rice.krad.workflow
Class SearchAttributeIndexRequestTest

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.workflow.SearchAttributeIndexRequestTest
All Implemented Interfaces:
MethodAware

public class SearchAttributeIndexRequestTest
extends KRADTestCase

This is a description of what this class does - jksmith don't forget to fill this in.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
(package private) static class SearchAttributeIndexRequestTest.DOCUMENT_FIXTURE
           
 
Nested classes/interfaces inherited from class org.kuali.rice.test.BaselineTestCase
BaselineTestCase.BaselineMode, BaselineTestCase.Mode
 
Field Summary
(package private) static org.apache.log4j.Logger LOG
           
(package private) static String SEARCH_ATTRIBUTE_INDEX_DOCUMENT_TEST_DOC_TYPE
           
 
Fields inherited from class org.kuali.rice.test.BaselineTestCase
dirty
 
Fields inherited from class org.kuali.rice.test.BaseModuleTestCase
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
SearchAttributeIndexRequestTest()
           
 
Method Summary
private  void assertDDSearchableAttributesWork(DocumentType docType, String principalId, String fieldName, Object[] searchValues, int[] resultSizes)
          A convenience method for testing wildcards on data dictionary searchable attributes.
 void blanketApproveTest()
          Tests that a blanket approved document is indexed correctly
private  SearchAttributeCriteriaComponent createSearchAttributeCriteriaComponent(String key, Object value, Boolean isLowerBoundValue, DocumentType docType)
           
private  Field getFieldByFormKey(DocumentType docType, String formKey)
           
 void regularApproveTest()
          Tests that a document, which goes through a regular approval process, is indexed correctly
 
Methods inherited from class org.kuali.test.KRADTestCase
getLoadApplicationLifecycle, getSuiteLifecycles, loadSuiteTestData
 
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, 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
 

Field Detail

LOG

static org.apache.log4j.Logger LOG

SEARCH_ATTRIBUTE_INDEX_DOCUMENT_TEST_DOC_TYPE

static final String SEARCH_ATTRIBUTE_INDEX_DOCUMENT_TEST_DOC_TYPE
See Also:
Constant Field Values
Constructor Detail

SearchAttributeIndexRequestTest

public SearchAttributeIndexRequestTest()
Method Detail

regularApproveTest

public void regularApproveTest()
                        throws Exception
Tests that a document, which goes through a regular approval process, is indexed correctly

Throws:
Exception

blanketApproveTest

public void blanketApproveTest()
                        throws Exception
Tests that a blanket approved document is indexed correctly

Throws:
Exception

assertDDSearchableAttributesWork

private void assertDDSearchableAttributesWork(DocumentType docType,
                                              String principalId,
                                              String fieldName,
                                              Object[] searchValues,
                                              int[] resultSizes)
                                       throws Exception
A convenience method for testing wildcards on data dictionary searchable attributes.

Parameters:
docType - The document type containing the attributes.
principalId - The ID of the user performing the search.
fieldName - The name of the field on the test document.
searchValues - The search expressions to test. Has to be a String array (for regular fields) or a String[] array (for multi-select fields).
resultSizes - The number of expected documents to be returned by the search; use -1 to indicate that an error should have occurred.
Throws:
Exception

createSearchAttributeCriteriaComponent

private SearchAttributeCriteriaComponent createSearchAttributeCriteriaComponent(String key,
                                                                                Object value,
                                                                                Boolean isLowerBoundValue,
                                                                                DocumentType docType)

getFieldByFormKey

private Field getFieldByFormKey(DocumentType docType,
                                String formKey)


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