org.kuali.rice.kew.actions
Class RecallActionTest

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

public class RecallActionTest
extends KEWTestCase


Nested Class Summary
static class RecallActionTest.RecallTestPostProcessor
          test postprocessor for testing afterActionTaken hook
 
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
RecallActionTest()
           
 
Method Summary
protected  void assertAfterActionTakenCalled(ActionType performed, ActionType taken)
           
protected  void assignRecallPermissionToDocumentRouters()
           
protected  void assignRoutePermissionToTechAdmin()
           
protected  Permission createPermissionForTemplate(String template_ns, String template_name, String permission_ns, String permission_name, String docType, String appDocStatus, String routeNode, String routeStatus)
           
protected  Permission createRecallPermission(String docType, String appDocStatus, String routeNode, String routeStatus)
           
protected  Permission createRouteDocumentPermission(String docType, String appDocStatus, String routeNode, String routeStatus)
           
protected  void disableInitiatorRecallPermission()
           
protected  void loadTestData()
           
protected  void setUpAfterDataLoad()
          Default implementation does nothing.
 void testCantRecallUnroutedDoc()
           
 void testRecallAsInitiatorAfterSingleApproval()
           
 void testRecallAsInitiatorBeforeAnyApprovals()
           
 void testRecallInvalidWhenFinal()
           
 void testRecallInvalidWhenProcessed()
           
 void testRecallPermissionAssignmentInsufficientForRouterToRecallDoc()
          Tests that simply assigning the recall permission to the Document Router derived role *without* assigning the Route Document permission to the Technical Admin role, is NOT sufficient to enable recall.
 void testRecallPermissionMatching()
          Tests that a new permission can be configured with the Recall Permission template and that matching works correctly against the new permission
 void testRecallPermissionTemplate()
           
protected  void testRecallToActionListAfterApprovals(String initiator, String recaller, String doctype)
           
protected  void testRecallToActionListAfterApprovals(String initiator, String recaller, String doctype, boolean expect_recall_success)
           
 void testRecallToActionListAsInitiatorAfterApprovals()
           
protected  void testRecallToActionListAsInitiatorAfterApprovals(String doctype)
           
 void testRecallToActionListAsInitiatorBeforeAnyApprovals()
           
 void testRecallToActionListAsInitiatorWithNotificationAfterApprovals()
           
 void testRecallToActionListAsInitiatorWithoutPendingNotificationAfterApprovals()
           
 void testRecallToActionListAsInitiatorWithThirdPartyNotificationAfterApprovals()
           
 void testRecallToActionListAsRouterDerivedRole()
          Tests that we can use the Route Document derived role to assign Recall permission to document routers.
 void testRecallToActionListAsThirdParty()
          Tests that the document is returned to the *recaller*'s action list, not the original initiator
 void testRoutePermissionAssignmentInsufficientForRouterToRecallDoc()
          Tests that simply assigning the Route Document permission to the Technical Admin role *without* assigning the Recall permission to the Document Router derived role, is NOT sufficient to enable recall.
 
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

RecallActionTest

public RecallActionTest()
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

assertAfterActionTakenCalled

protected void assertAfterActionTakenCalled(ActionType performed,
                                            ActionType taken)

testCantRecallUnroutedDoc

public void testCantRecallUnroutedDoc()

testRecallAsInitiatorBeforeAnyApprovals

public void testRecallAsInitiatorBeforeAnyApprovals()
                                             throws Exception
Throws:
Exception

testRecallAsInitiatorAfterSingleApproval

public void testRecallAsInitiatorAfterSingleApproval()
                                              throws Exception
Throws:
Exception

testRecallInvalidWhenProcessed

public void testRecallInvalidWhenProcessed()
                                    throws Exception
Throws:
Exception

testRecallInvalidWhenFinal

public void testRecallInvalidWhenFinal()
                                throws Exception
Throws:
Exception

testRecallToActionListAsInitiatorBeforeAnyApprovals

public void testRecallToActionListAsInitiatorBeforeAnyApprovals()
                                                         throws Exception
Throws:
Exception

createRecallPermission

protected Permission createRecallPermission(String docType,
                                            String appDocStatus,
                                            String routeNode,
                                            String routeStatus)

createRouteDocumentPermission

protected Permission createRouteDocumentPermission(String docType,
                                                   String appDocStatus,
                                                   String routeNode,
                                                   String routeStatus)

createPermissionForTemplate

protected Permission createPermissionForTemplate(String template_ns,
                                                 String template_name,
                                                 String permission_ns,
                                                 String permission_name,
                                                 String docType,
                                                 String appDocStatus,
                                                 String routeNode,
                                                 String routeStatus)

disableInitiatorRecallPermission

protected void disableInitiatorRecallPermission()

testRecallPermissionMatching

public void testRecallPermissionMatching()
Tests that a new permission can be configured with the Recall Permission template and that matching works correctly against the new permission


testRecallPermissionTemplate

public void testRecallPermissionTemplate()
                                  throws Exception
Throws:
Exception

testRecallToActionListAsInitiatorAfterApprovals

public void testRecallToActionListAsInitiatorAfterApprovals()
                                                     throws Exception
Throws:
Exception

testRecallToActionListAsInitiatorWithNotificationAfterApprovals

public void testRecallToActionListAsInitiatorWithNotificationAfterApprovals()
                                                                     throws Exception
Throws:
Exception

testRecallToActionListAsInitiatorWithoutPendingNotificationAfterApprovals

public void testRecallToActionListAsInitiatorWithoutPendingNotificationAfterApprovals()
                                                                               throws Exception
Throws:
Exception

testRecallToActionListAsInitiatorWithThirdPartyNotificationAfterApprovals

public void testRecallToActionListAsInitiatorWithThirdPartyNotificationAfterApprovals()
                                                                               throws Exception
Throws:
Exception

testRecallToActionListAsThirdParty

public void testRecallToActionListAsThirdParty()
                                        throws Exception
Tests that the document is returned to the *recaller*'s action list, not the original initiator

Throws:
Exception

assignRoutePermissionToTechAdmin

protected void assignRoutePermissionToTechAdmin()

assignRecallPermissionToDocumentRouters

protected void assignRecallPermissionToDocumentRouters()

testRoutePermissionAssignmentInsufficientForRouterToRecallDoc

public void testRoutePermissionAssignmentInsufficientForRouterToRecallDoc()
                                                                   throws Exception
Tests that simply assigning the Route Document permission to the Technical Admin role *without* assigning the Recall permission to the Document Router derived role, is NOT sufficient to enable recall.

Throws:
Exception

testRecallPermissionAssignmentInsufficientForRouterToRecallDoc

public void testRecallPermissionAssignmentInsufficientForRouterToRecallDoc()
                                                                    throws Exception
Tests that simply assigning the recall permission to the Document Router derived role *without* assigning the Route Document permission to the Technical Admin role, is NOT sufficient to enable recall.

Throws:
Exception

testRecallToActionListAsRouterDerivedRole

public void testRecallToActionListAsRouterDerivedRole()
                                               throws Exception
Tests that we can use the Route Document derived role to assign Recall permission to document routers.

Throws:
Exception

testRecallToActionListAsInitiatorAfterApprovals

protected void testRecallToActionListAsInitiatorAfterApprovals(String doctype)

testRecallToActionListAfterApprovals

protected void testRecallToActionListAfterApprovals(String initiator,
                                                    String recaller,
                                                    String doctype)

testRecallToActionListAfterApprovals

protected void testRecallToActionListAfterApprovals(String initiator,
                                                    String recaller,
                                                    String doctype,
                                                    boolean expect_recall_success)


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