org.kuali.rice.kew.routeheader
Class AppDocStatusTest
java.lang.Object
org.kuali.rice.test.BaseRiceTestCase
org.kuali.rice.test.RiceTestCase
org.kuali.rice.test.RiceInternalSuiteDataTestCase
org.kuali.rice.test.BaseModuleTestCase
org.kuali.rice.test.BaselineTestCase
org.kuali.rice.kew.test.KEWTestCase
org.kuali.rice.kew.routeheader.AppDocStatusTest
- All Implemented Interfaces:
- MethodAware
public class AppDocStatusTest
- extends KEWTestCase
Methods inherited from class org.kuali.rice.kew.test.KEWTestCase |
clearCacheManagers, getGroupIdForName, getLoadApplicationLifecycle, getNextSequenceLongValue, getNextSequenceStringValue, getPerTestLifecycles, getPerTestTablesNotToClear, getPerTestTablesToClear, getPrincipalIdForName, getPrincipalNameForId, getRoleIdForName, getSuiteLifecycles, getTransactionTemplate, loadDefaultTestData, loadPerTestData, loadSuiteTestData, loadXmlFile, loadXmlFile, loadXmlFileFromFileSystem, loadXmlStream, setUpAfterDataLoad |
Methods inherited from class org.kuali.rice.test.RiceTestCase |
configureLogging, dumpMemory, getConfigLocations, getFullTestName, getModuleTestConfigLocation, getRiceMasterDefaultConfigFile, getTestHarnessConfig, getTestHarnessSpringBeansLocation, getTestHarnessSpringResourceLoader, getUserDir, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, setUpInternal, startLifecycles, startSuiteDataLoaderLifecycles, stopLifecycles, tearDown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AppDocStatusTest
public AppDocStatusTest()
loadTestData
protected void loadTestData()
throws Exception
- Overrides:
loadTestData
in class KEWTestCase
- Throws:
Exception
testValidAppDocStatus
public void testValidAppDocStatus()
throws Exception
- This method performs several positive tests related to Application Document Status
For these tests the doctype definition defines a valid set of statuses.
It also defines two status transitions in the route path
It tests:
- That the AppDocStatus is properly set by the workflow engine during
appropriate transitions.
- That the AppDocStatus may be retrieved by the client API
- That the AppDocStatus may be set by the client API
- That a history of AppDocStatus transitions is created.
- Throws:
Exception
testAppDocStatusValuesNotDefined
public void testAppDocStatusValuesNotDefined()
throws Exception
- This method is similar to the above test, except that the doctype definition
does NOT specify a valid set of values. This means that the value can be any valid string.
- Throws:
Exception
testInvalidAppDocStatusValue
public void testInvalidAppDocStatusValue()
throws Exception
- This test attempts to set an invalid status value for a document that has a valid set
of statuses defined.
It expects to throw a WorkflowRuntimeException when attempting to set the invalid status value.
- Throws:
Exception
testValidInheritedAppDocStatus
public void testValidInheritedAppDocStatus()
throws Exception
- This method is similar to the above test, except that the doctype definition
INHERITS a valid set of application document status values.
- Throws:
Exception
testValidInheritedAppDocStatusWithCategories
public void testValidInheritedAppDocStatusWithCategories()
throws Exception
- This method an inherited valid set of values and categories.
- Throws:
Exception
testInheritedAppDocStatusWithKEWStatus
public void testInheritedAppDocStatusWithKEWStatus()
throws Exception
- This method tests a valid set of application document status values that are not inherited due to KEW status (KULRICE-8943).
- Throws:
Exception
testSearching
public void testSearching()
throws InterruptedException
- Throws:
InterruptedException
assertSearchStatus
protected void assertSearchStatus(String documentTypeName,
Person user,
String appDocStatus,
int expected,
long changed)
- Verifies the DocumentSearchService finds documents with a given app document status
- Parameters:
documentTypeName
- the doc typeuser
- user for lookupappDocStatus
- the app doc status targetexpected
- the expected number of resultschanged
- the time the transition occurred (used for from/to range)
assertAppDocStatuses
protected void assertAppDocStatuses(String documentId,
String[] appDocStatuses)
- Verifies the document application document status history
- Parameters:
documentId
- the doc idappDocStatuses
- list of app doc statuses in chronological order
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.