org.kuali.rice.kew.docsearch
Class DocumentSearchTest

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

public class DocumentSearchTest
extends KEWTestCase


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
DocumentSearchTest()
           
 
Method Summary
protected  void assertDocumentStatus(String documentType, String principalId, DocumentStatus status, int num)
          Asserts that there are a certain number of docs in the given status
protected  void assertDocumentStatusCategory(String documentType, String principalId, DocumentStatusCategory status, int num)
          Asserts that there are a certain number of docs in the given document status category
protected  void assertDocumentStatuses(String documentType, String principalId, int initiated, int saved, int enroute, int exception, int processed, int finl, int canceled, int disapproved)
          Asserts that documents are present in the given statuses, including document status categories (this requires that no docs are in the system prior to routing of the test docs)
protected  void loadTestData()
           
protected static String marshall(DocumentSearchCriteria criteria)
           
protected  String routeTestDoc2()
          "Saves" a single instance of a "SearchDocType2" document and returns it's id.
protected  String[] routeTestDocs()
          Routes some test docs for searching
protected  void setUpAfterDataLoad()
          Default implementation does nothing.
 void testAdditionalDocumentTypesCriteria()
           
 void testDocSearch_appDocStatuses()
           
 void testDocSearch_criteriaModified()
           
 void testDocSearch_fetchMoreIterationLimit()
           
 void testDocSearch_maxResults()
           
 void testDocSearch_maxResultsCap()
           
 void testDocSearch_maxResultsIsNull()
           
 void testDocSearch_maxResultsIsZero()
           
 void testDocSearch_MissingInitiator()
          Test for https://test.kuali.org/jira/browse/KULRICE-1968 - Document search fails when users are missing Tests that we can safely search on docs whose initiator no longer exists in the identity management system This test searches by doc type name criteria.
 void testDocSearch_RouteNodeName()
           
 void testDocSearch_SearchOnMissingInitiator()
          Test for https://test.kuali.org/jira/browse/KULRICE-1968 - Tests that we get an error if we try and search on an initiator that doesn't exist in the IDM system
 void testDocSearch_startAtIndex()
           
 void testDocSearch_startAtIndexMoreThanResuls()
           
 void testDocSearch_startAtIndexNegative()
           
 void testDocSearch_startAtIndexZero()
           
 void testDocSearch_WildcardsOnRegularAttributes()
          Tests the usage of wildcards on the regular document search attributes.
 void testDocSearch()
           
 void testDocSearchDocumentResult()
           
 void testDocSearchWithAttributes()
          Tests searching against document search attrs
 void testDocumentStatusSearching()
          Tests searching on document status and document status category
 void testGetNamedDocSearches()
           
 void testNamedDocSearchPersistence()
          Tests that performing a named search automatically saves the last search criteria as well as named search
 void testUnnamedDocSearchPersistence()
          Tests that performing a search automatically saves the last search criteria
 
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
 
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

DocumentSearchTest

public DocumentSearchTest()
Method Detail

loadTestData

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

setUpAfterDataLoad

protected void setUpAfterDataLoad()
                           throws Exception
Description copied from class: KEWTestCase
Default implementation does nothing. Subclasses should override this method if they want to perform setup work inside of a database transaction.

Overrides:
setUpAfterDataLoad in class KEWTestCase
Throws:
Exception

testDocSearch

public void testDocSearch()
                   throws Exception
Throws:
Exception

testDocSearchDocumentResult

public void testDocSearchDocumentResult()
                                 throws Exception
Throws:
Exception

testDocSearch_appDocStatuses

public void testDocSearch_appDocStatuses()
                                  throws Exception
Throws:
Exception

testDocSearch_maxResults

public void testDocSearch_maxResults()
                              throws Exception
Throws:
Exception

testDocSearch_maxResultsIsNull

public void testDocSearch_maxResultsIsNull()
                                    throws Exception
Throws:
Exception

testDocSearch_maxResultsIsZero

public void testDocSearch_maxResultsIsZero()
                                    throws Exception
Throws:
Exception

testDocSearch_startAtIndex

public void testDocSearch_startAtIndex()
                                throws Exception
Throws:
Exception

testDocSearch_startAtIndexMoreThanResuls

public void testDocSearch_startAtIndexMoreThanResuls()
                                              throws Exception
Throws:
Exception

testDocSearch_startAtIndexNegative

public void testDocSearch_startAtIndexNegative()
                                        throws Exception
Throws:
Exception

testDocSearch_startAtIndexZero

public void testDocSearch_startAtIndexZero()
                                    throws Exception
Throws:
Exception

testUnnamedDocSearchPersistence

public void testUnnamedDocSearchPersistence()
                                     throws Exception
Tests that performing a search automatically saves the last search criteria

Throws:
Exception

testNamedDocSearchPersistence

public void testNamedDocSearchPersistence()
                                   throws Exception
Tests that performing a named search automatically saves the last search criteria as well as named search

Throws:
Exception

marshall

protected static String marshall(DocumentSearchCriteria criteria)
                          throws Exception
Throws:
Exception

testDocSearch_criteriaModified

public void testDocSearch_criteriaModified()
                                    throws Exception
Throws:
Exception

testDocSearch_MissingInitiator

public void testDocSearch_MissingInitiator()
                                    throws Exception
Test for https://test.kuali.org/jira/browse/KULRICE-1968 - Document search fails when users are missing Tests that we can safely search on docs whose initiator no longer exists in the identity management system This test searches by doc type name criteria.

Throws:
Exception

testDocSearch_SearchOnMissingInitiator

public void testDocSearch_SearchOnMissingInitiator()
                                            throws Exception
Test for https://test.kuali.org/jira/browse/KULRICE-1968 - Tests that we get an error if we try and search on an initiator that doesn't exist in the IDM system

Throws:
Exception

testDocSearch_RouteNodeName

public void testDocSearch_RouteNodeName()
                                 throws Exception
Throws:
Exception

testGetNamedDocSearches

public void testGetNamedDocSearches()
                             throws Exception
Throws:
Exception

testDocSearchWithAttributes

public void testDocSearchWithAttributes()
                                 throws Exception
Tests searching against document search attrs

Throws:
Exception

testDocSearch_WildcardsOnRegularAttributes

public void testDocSearch_WildcardsOnRegularAttributes()
                                                throws Exception
Tests the usage of wildcards on the regular document search attributes.

Throws:
Exception

testAdditionalDocumentTypesCriteria

public void testAdditionalDocumentTypesCriteria()
                                         throws Exception
Throws:
Exception

testDocumentStatusSearching

public void testDocumentStatusSearching()
Tests searching on document status and document status category


assertDocumentStatuses

protected void assertDocumentStatuses(String documentType,
                                      String principalId,
                                      int initiated,
                                      int saved,
                                      int enroute,
                                      int exception,
                                      int processed,
                                      int finl,
                                      int canceled,
                                      int disapproved)
Asserts that documents are present in the given statuses, including document status categories (this requires that no docs are in the system prior to routing of the test docs)


assertDocumentStatus

protected void assertDocumentStatus(String documentType,
                                    String principalId,
                                    DocumentStatus status,
                                    int num)
Asserts that there are a certain number of docs in the given status


assertDocumentStatusCategory

protected void assertDocumentStatusCategory(String documentType,
                                            String principalId,
                                            DocumentStatusCategory status,
                                            int num)
Asserts that there are a certain number of docs in the given document status category


routeTestDocs

protected String[] routeTestDocs()
Routes some test docs for searching

Returns:
String[] of doc ids

routeTestDoc2

protected String routeTestDoc2()
"Saves" a single instance of a "SearchDocType2" document and returns it's id.


testDocSearch_maxResultsCap

public void testDocSearch_maxResultsCap()
                                 throws Exception
Throws:
Exception

testDocSearch_fetchMoreIterationLimit

public void testDocSearch_fetchMoreIterationLimit()
                                           throws Exception
Throws:
Exception


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