Package org.camunda.bpm.engine.impl.test
Class AbstractProcessEngineTestCase
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.camunda.bpm.engine.impl.test.PvmTestCase
-
- org.camunda.bpm.engine.impl.test.AbstractProcessEngineTestCase
-
- All Implemented Interfaces:
junit.framework.Test
- Direct Known Subclasses:
PluggableProcessEngineTestCase,ResourceProcessEngineTestCase
public abstract class AbstractProcessEngineTestCase extends PvmTestCase
- Author:
- Tom Baeyens
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthorizationServiceauthorizationServiceprotected CaseServicecaseServiceprotected DecisionServicedecisionServiceprotected java.lang.StringdeploymentIdprotected java.util.Set<java.lang.String>deploymentIdsprotected java.lang.Throwableexceptionprotected ExternalTaskServiceexternalTaskServiceprotected FilterServicefilterServiceprotected FormServiceformServiceprotected HistoryServicehistoryServiceprotected IdentityServiceidentityServiceprotected ManagementServicemanagementServiceprotected ProcessEngineprocessEngineprotected ProcessEngineConfigurationImplprocessEngineConfigurationprotected RepositoryServicerepositoryServiceprotected RuntimeServiceruntimeServiceprotected TaskServicetaskService
-
Constructor Summary
Constructors Constructor Description AbstractProcessEngineTestCase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanareJobsAvailable()voidassertCaseEnded(java.lang.String caseInstanceId)voidassertProcessEnded(java.lang.String processInstanceId)voidassertProcessNotEnded(java.lang.String processInstanceId)protected voidclearServiceReferences()protected voidcloseDownProcessEngine()protected voiddeleteDeployments()protected voiddeleteHistoryCleanupJobs()protected java.lang.Stringdeployment(java.lang.String... resources)protected java.lang.Stringdeployment(DeploymentBuilder deploymentBuilder, java.lang.String... resources)protected java.lang.Stringdeployment(DeploymentBuilder deploymentBuilder, BpmnModelInstance... bpmnModelInstances)protected java.lang.Stringdeployment(BpmnModelInstance... bpmnModelInstances)protected java.lang.StringdeploymentForTenant(java.lang.String tenantId, java.lang.String... resources)protected java.lang.StringdeploymentForTenant(java.lang.String tenantId, java.lang.String classpathResource, BpmnModelInstance modelInstance)protected java.lang.StringdeploymentForTenant(java.lang.String tenantId, BpmnModelInstance... bpmnModelInstances)protected java.lang.StringdeploymentWithBuilder(DeploymentBuilder builder)voidexecuteAvailableJobs()Execute all available jobs recursively till no more jobs found.voidexecuteAvailableJobs(boolean recursive)voidexecuteAvailableJobs(int expectedExecutions)Execute all available jobs recursively till no more jobs found or the number of executions is higher than expected.protected java.util.List<ActivityInstance>getInstancesForActivitiyId(ActivityInstance activityInstance, java.lang.String activityId)Deprecated.protected java.util.List<ActivityInstance>getInstancesForActivityId(ActivityInstance activityInstance, java.lang.String activityId)protected abstract voidinitializeProcessEngine()protected voidinitializeServices()protected voidrunAsUser(java.lang.String userId, java.util.List<java.lang.String> groupIds, java.lang.Runnable r)voidrunBare()voidwaitForJobExecutorOnCondition(long maxMillisToWait, long intervalMillis, java.util.concurrent.Callable<java.lang.Boolean> condition)Deprecated.voidwaitForJobExecutorOnCondition(long maxMillisToWait, java.util.concurrent.Callable<java.lang.Boolean> condition)voidwaitForJobExecutorToProcessAllJobs(long maxMillisToWait)voidwaitForJobExecutorToProcessAllJobs(long maxMillisToWait, long intervalMillis)Deprecated.-
Methods inherited from class org.camunda.bpm.engine.impl.test.PvmTestCase
assertTextPresent, assertTextPresentIgnoreCase, defaultManualActivation
-
Methods 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, runTest, setName, setUp, tearDown, toString
-
-
-
-
Field Detail
-
processEngine
protected ProcessEngine processEngine
-
deploymentId
protected java.lang.String deploymentId
-
deploymentIds
protected java.util.Set<java.lang.String> deploymentIds
-
exception
protected java.lang.Throwable exception
-
processEngineConfiguration
protected ProcessEngineConfigurationImpl processEngineConfiguration
-
repositoryService
protected RepositoryService repositoryService
-
runtimeService
protected RuntimeService runtimeService
-
taskService
protected TaskService taskService
-
formService
protected FormService formService
-
historyService
protected HistoryService historyService
-
identityService
protected IdentityService identityService
-
managementService
protected ManagementService managementService
-
authorizationService
protected AuthorizationService authorizationService
-
caseService
protected CaseService caseService
-
filterService
protected FilterService filterService
-
externalTaskService
protected ExternalTaskService externalTaskService
-
decisionService
protected DecisionService decisionService
-
-
Method Detail
-
initializeProcessEngine
protected abstract void initializeProcessEngine()
-
closeDownProcessEngine
protected void closeDownProcessEngine()
-
runBare
public void runBare() throws java.lang.Throwable- Overrides:
runBarein classjunit.framework.TestCase- Throws:
java.lang.Throwable
-
deleteHistoryCleanupJobs
protected void deleteHistoryCleanupJobs()
-
deleteDeployments
protected void deleteDeployments()
-
initializeServices
protected void initializeServices()
-
clearServiceReferences
protected void clearServiceReferences()
-
assertProcessEnded
public void assertProcessEnded(java.lang.String processInstanceId)
-
assertProcessNotEnded
public void assertProcessNotEnded(java.lang.String processInstanceId)
-
assertCaseEnded
public void assertCaseEnded(java.lang.String caseInstanceId)
-
waitForJobExecutorToProcessAllJobs
@Deprecated public void waitForJobExecutorToProcessAllJobs(long maxMillisToWait, long intervalMillis)Deprecated.
-
waitForJobExecutorToProcessAllJobs
public void waitForJobExecutorToProcessAllJobs(long maxMillisToWait)
-
waitForJobExecutorOnCondition
@Deprecated public void waitForJobExecutorOnCondition(long maxMillisToWait, long intervalMillis, java.util.concurrent.Callable<java.lang.Boolean> condition)Deprecated.
-
waitForJobExecutorOnCondition
public void waitForJobExecutorOnCondition(long maxMillisToWait, java.util.concurrent.Callable<java.lang.Boolean> condition)
-
executeAvailableJobs
public void executeAvailableJobs()
Execute all available jobs recursively till no more jobs found.
-
executeAvailableJobs
public void executeAvailableJobs(int expectedExecutions)
Execute all available jobs recursively till no more jobs found or the number of executions is higher than expected.- Parameters:
expectedExecutions- number of expected job executions- Throws:
junit.framework.AssertionFailedError- when execute less or more jobs than expected- See Also:
executeAvailableJobs()
-
executeAvailableJobs
public void executeAvailableJobs(boolean recursive)
-
areJobsAvailable
public boolean areJobsAvailable()
-
getInstancesForActivitiyId
@Deprecated protected java.util.List<ActivityInstance> getInstancesForActivitiyId(ActivityInstance activityInstance, java.lang.String activityId)
Deprecated.
-
getInstancesForActivityId
protected java.util.List<ActivityInstance> getInstancesForActivityId(ActivityInstance activityInstance, java.lang.String activityId)
-
runAsUser
protected void runAsUser(java.lang.String userId, java.util.List<java.lang.String> groupIds, java.lang.Runnable r)
-
deployment
protected java.lang.String deployment(BpmnModelInstance... bpmnModelInstances)
-
deployment
protected java.lang.String deployment(java.lang.String... resources)
-
deploymentForTenant
protected java.lang.String deploymentForTenant(java.lang.String tenantId, BpmnModelInstance... bpmnModelInstances)
-
deploymentForTenant
protected java.lang.String deploymentForTenant(java.lang.String tenantId, java.lang.String... resources)
-
deploymentForTenant
protected java.lang.String deploymentForTenant(java.lang.String tenantId, java.lang.String classpathResource, BpmnModelInstance modelInstance)
-
deployment
protected java.lang.String deployment(DeploymentBuilder deploymentBuilder, BpmnModelInstance... bpmnModelInstances)
-
deployment
protected java.lang.String deployment(DeploymentBuilder deploymentBuilder, java.lang.String... resources)
-
deploymentWithBuilder
protected java.lang.String deploymentWithBuilder(DeploymentBuilder builder)
-
-