Package org.activiti.engine.impl.test
Class AbstractActivitiTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.activiti.engine.impl.test.AbstractTestCase
org.activiti.engine.impl.test.AbstractActivitiTestCase
- All Implemented Interfaces:
junit.framework.Test
- Direct Known Subclasses:
PluggableActivitiTestCase,ResourceActivitiTestCase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected DynamicBpmnServiceprotected Throwableprotected HistoryServiceprotected ManagementServiceprotected ProcessEngineprotected ProcessEngineConfigurationImplprotected RepositoryServiceprotected RuntimeServiceprotected TaskServiceFields inherited from class org.activiti.engine.impl.test.AbstractTestCase
EMPTY_LINE, isEmptyLinesEnabled, log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidEach test is assumed to clean up all DB content it entered.protected voidassertHistoricActivitiesDeleteReason(ProcessInstance processInstance, String expectedDeleteReason, String... activityIds) protected voidassertHistoricTasksDeleteReason(ProcessInstance processInstance, String expectedDeleteReason, String... taskNames) voidassertProcessEnded(String processInstanceId) voidassertProcessNotEnded(String processInstanceId) protected voidSince the 'one task process' is used everywhere the actual process content doesn't matter, instead of copying around the BPMN 2.0 xml one could use this methodwhich gives aBpmnModelversion of the same process back.Creates and deploys the one task process.voidexecuteJobExecutorForTime(long maxMillisToWait, long intervalMillis) protected abstract voidprotected voidvoidrunBare()protected voidsetUp()protected voidvoidwaitForJobExecutorOnCondition(long maxMillisToWait, long intervalMillis, Callable<Boolean> condition) voidwaitForJobExecutorToProcessAllJobs(long maxMillisToWait, long intervalMillis) voidwaitForJobExecutorToProcessAllJobsAndExecutableTimerJobs(long maxMillisToWait, long intervalMillis) Methods inherited from class org.activiti.engine.impl.test.AbstractTestCase
assertTextPresent, assertTextPresentIgnoreCase, runTestMethods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, setName, tearDown, toString
-
Field Details
-
processEngine
-
deploymentIdFromDeploymentAnnotation
-
deploymentIdsForAutoCleanup
-
exception
-
processEngineConfiguration
-
repositoryService
-
runtimeService
-
taskService
-
historyService
-
managementService
-
dynamicBpmnService
-
-
Constructor Details
-
AbstractActivitiTestCase
public AbstractActivitiTestCase()
-
-
Method Details
-
setUp
- Overrides:
setUpin classjunit.framework.TestCase- Throws:
Exception
-
initializeProcessEngine
protected abstract void initializeProcessEngine() -
closeDownProcessEngine
protected void closeDownProcessEngine() -
runBare
- Overrides:
runBarein classjunit.framework.TestCase- Throws:
Throwable
-
validateHistoryData
protected void validateHistoryData() -
assertAndEnsureCleanDb
Each test is assumed to clean up all DB content it entered. After a test method executed, this method scans all tables to see if the DB is completely clean. It throws AssertionFailed in case the DB is not clean. If the DB is not clean, it is cleaned by performing a create a drop.- Throws:
Throwable
-
initializeServices
protected void initializeServices() -
assertProcessNotEnded
-
assertProcessEnded
-
waitForJobExecutorToProcessAllJobs
public void waitForJobExecutorToProcessAllJobs(long maxMillisToWait, long intervalMillis) -
waitForJobExecutorOnCondition
-
executeJobExecutorForTime
public void executeJobExecutorForTime(long maxMillisToWait, long intervalMillis) -
waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs
public void waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs(long maxMillisToWait, long intervalMillis) -
createOneTaskTestProcess
Since the 'one task process' is used everywhere the actual process content doesn't matter, instead of copying around the BPMN 2.0 xml one could use this methodwhich gives aBpmnModelversion of the same process back. -
createTwoTasksTestProcess
-
createOneTaskAndStartEventWithFormKeyProcess
-
deployOneTaskTestProcess
Creates and deploys the one task process. SeecreateOneTaskTestProcess().- Returns:
- The process definition id (NOT the process definition key) of deployed one task process.
-
deployTwoTasksTestProcess
-
assertHistoricTasksDeleteReason
protected void assertHistoricTasksDeleteReason(ProcessInstance processInstance, String expectedDeleteReason, String... taskNames) -
assertHistoricActivitiesDeleteReason
protected void assertHistoricActivitiesDeleteReason(ProcessInstance processInstance, String expectedDeleteReason, String... activityIds)
-