org.kuali.rice.kew.test
Class KEWTestCase

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
All Implemented Interfaces:
MethodAware
Direct Known Subclasses:
AcknowledgeActionTest, ActionInvocationQueueImplTest, ActionItemServiceTest, ActionListTest, ActionRequestDerivedRoleTypeServiceImplTest, ActionRequestScenariosTest, AddRuleDelegationTest, AdHocRouteTest, AppDocStatusTest, ApproveActionTest, AttributeClientRoutingDataValidationTest, BeanConverterTester, BlanketApproveTest, BranchTest, CancelActionTest, ClearFYIActionTest, CreateDocumentTest, DisapproveActionTest, DocumentContentTest, DocumentLinkTest, DocumentRefreshQueueTest, DocumentSearchCustomizerTest, DocumentSearchSecurityTest, DocumentSearchTest, DocumentSearchTestBase, DocumentTypeMaintainableTest, DocumentTypePermissionServiceTest, DocumentTypeTest, DocumentTypeXmlParserTest, DTOConverterTest, DynamicRoutingTest, EDLControllerTest, EDLCreationTest, EDLGlobalConfigFactoryTest, EDocLitePostProcessorTest, EDocLiteServiceImplTest, EDocLiteXPathTest, EmailContentServiceTest, EmailMessageTest, EmailReminderLifecycleTest, EmptyProcessTest, ExceptionRoutingServiceTest, ExceptionRoutingTest, ExtraClassPathTest, FutureRequestsTest, GroupXmlImportTest, HierarchyRoutingNodeTest, HotDeployTest, ImmediateEmailReminderQueueImplTest, IngesterActionTest, KewToRulesEngineIntegrationTest, LogDocumentActionTest, MailerTest, MoveDocumentTest, NetworkIdRoleAttributeTest, NoteServiceTest, NoteServiceTest, NotificationServiceTest, NotificationSuppressionTest, OfficeOfAffirmativeActionTest, OjbBeanTestCase, OutboxTest, ParallelRoutingTest, PeopleFlowBoTest, PeopleFlowRoutingTest, PeopleFlowServiceTest, Pipe, PipeTransformationTest, PluginConfigParserTest, PostProcessorSpawnedDocumentTest, PostProcessorTest, PreferencesServiceTest, PrincipalIdRoleAttributeTest, QuickLinksServiceTest, RecallActionTest, ReleaseWorkgroupAuthorityTest, ResponsibilityIdServiceTest, ReturnToPreviousNodeActionTest, RevokeAdHocActionTest, RoleAttributeTest, RoleRouteModuleTest, RoleServiceTest, RoleTest, RouteDocumentTest, RouteHeaderServiceTest, RouteLogActionTest, RouteLogAuthenticationTest, RouteNodeConfigParamTest, RouteNodeServiceTest, RoutingReportServiceTest, RoutingToInactiveWorkgroupTest, RoutingWithEmptyWorkGroupTest, RuleServiceTest, RuleTemplateAttributeTest, RuleTemplateDefaultsTest, RuleTemplateXmlParserTest, RuleValidationAttributeRemotingTest, RuleXmlParserTest, SaveActionEventTest, SequentialRoutingTest, ServiceInvocationRuleTest, StandardGenericXMLRuleAttributeTest, StandardWorkflowEngineTest, StartWorkflowTestEnv, StyleServiceImplTest, SubProcessRoutingTest, SuperUserActionRequestApproveEventTest, SuperUserActionTest, SuperUserCancelTest, SuperUserDisapproveTest, TakeWorkgroupAuthorityTest, UniversityIdRoleAttributeTest, ValidActionsTest, VariablesTest, WorkflowDocumentServiceTest, WorkflowDocumentTest, WorkflowInfoTest, WorkflowUtilityTest, XmlExporterTestCase, XmlImportTest, XmlIngestionTest, ZipFilePluginLoaderTest

public abstract class KEWTestCase
extends BaselineTestCase

Useful superclass for all KEW test cases. Handles setup of test utilities and a test environment. Configures the Spring test environment providing a template method for custom context files in test mode. Also provides a template method for running custom transactional setUp. Tear down handles automatic tear down of objects created inside the test environment.


Nested Class Summary
 class KEWTestCase.ClearCacheLifecycle
          Flushes the KEW cache(s)
 
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
KEWTestCase()
           
 
Method Summary
protected  void clearCacheManagers(org.springframework.cache.CacheManager... cacheManagers)
           
protected  String getGroupIdForName(String namespace, String groupName)
           
protected  Lifecycle getLoadApplicationLifecycle()
           
protected  List<Lifecycle> getPerTestLifecycles()
          Override the standard per-test lifecycles to prepend ClearDatabaseLifecycle and ClearCacheLifecycle
protected  List<String> getPerTestTablesNotToClear()
           
protected  List<String> getPerTestTablesToClear()
          Returns the List of tables that should be cleared on every test run.
protected  String getPrincipalIdForName(String principalName)
           
protected  String getPrincipalNameForId(String principalId)
           
protected  List<Lifecycle> getSuiteLifecycles()
           
protected  org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()
           
protected  void loadDefaultTestData()
          By default this loads the "default" data set from the DefaultTestData.sql and DefaultTestData.xml files.
protected  void loadPerTestData()
          Initiates loading of per-test data
protected  void loadSuiteTestData()
           
protected  void loadTestData()
           
protected  void loadXmlFile(Class clazz, String fileName)
           
protected  void loadXmlFile(String fileName)
           
protected  void loadXmlFileFromFileSystem(String fileName)
           
protected  void loadXmlStream(InputStream xmlStream)
           
protected  void setUpAfterDataLoad()
          Default implementation does nothing.
 
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

KEWTestCase

public KEWTestCase()
Method Detail

getSuiteLifecycles

protected List<Lifecycle> getSuiteLifecycles()
Overrides:
getSuiteLifecycles in class RiceTestCase

loadSuiteTestData

protected void loadSuiteTestData()
                          throws Exception
Overrides:
loadSuiteTestData in class RiceInternalSuiteDataTestCase
Throws:
Exception

loadDefaultTestData

protected void loadDefaultTestData()
                            throws Exception
By default this loads the "default" data set from the DefaultTestData.sql and DefaultTestData.xml files. Subclasses can override this to change this behaviour

Throws:
Exception

getLoadApplicationLifecycle

protected Lifecycle getLoadApplicationLifecycle()
Overrides:
getLoadApplicationLifecycle in class RiceTestCase

setUpAfterDataLoad

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

Throws:
Exception

loadTestData

protected void loadTestData()
                     throws Exception
Throws:
Exception

getTransactionTemplate

protected org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()

loadPerTestData

protected void loadPerTestData()
                        throws Exception
Initiates loading of per-test data

Overrides:
loadPerTestData in class RiceTestCase
Throws:
Exception

getPerTestLifecycles

protected List<Lifecycle> getPerTestLifecycles()
Override the standard per-test lifecycles to prepend ClearDatabaseLifecycle and ClearCacheLifecycle

Overrides:
getPerTestLifecycles in class BaselineTestCase
See Also:
RiceTestCase.getPerTestLifecycles()

clearCacheManagers

protected void clearCacheManagers(org.springframework.cache.CacheManager... cacheManagers)

getPerTestTablesToClear

protected List<String> getPerTestTablesToClear()
Returns the List of tables that should be cleared on every test run.

Overrides:
getPerTestTablesToClear in class BaselineTestCase

getPerTestTablesNotToClear

protected List<String> getPerTestTablesNotToClear()
Overrides:
getPerTestTablesNotToClear in class BaselineTestCase

loadXmlFile

protected void loadXmlFile(String fileName)

loadXmlFile

protected void loadXmlFile(Class clazz,
                           String fileName)

loadXmlFileFromFileSystem

protected void loadXmlFileFromFileSystem(String fileName)

loadXmlStream

protected void loadXmlStream(InputStream xmlStream)

getPrincipalIdForName

protected String getPrincipalIdForName(String principalName)

getPrincipalNameForId

protected String getPrincipalNameForId(String principalId)

getGroupIdForName

protected String getGroupIdForName(String namespace,
                                   String groupName)


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