org.camunda.bpm.engine.impl.test
Class AbstractProcessEngineTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.camunda.bpm.engine.impl.test.PvmTestCase
              extended by 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
protected  AuthorizationService authorizationService
           
protected  CaseService caseService
           
protected  String deploymentId
           
protected  Throwable exception
           
protected  FilterService filterService
           
protected  FormService formService
           
protected  HistoryService historyService
           
protected  IdentityService identityService
           
protected  ManagementService managementService
           
protected  ProcessEngine processEngine
           
protected  ProcessEngineConfigurationImpl processEngineConfiguration
           
protected  RepositoryService repositoryService
           
protected  RuntimeService runtimeService
           
protected  TaskService taskService
           
protected  LogUtil.ThreadLogMode threadRenderingMode
           
 
Fields inherited from class org.camunda.bpm.engine.impl.test.PvmTestCase
DEFAULT_THREAD_LOG_MODE, EMPTY_LINE, isEmptyLinesEnabled, log
 
Constructor Summary
AbstractProcessEngineTestCase()
           
 
Method Summary
 boolean areJobsAvailable()
           
protected  void assertAndEnsureCleanDb()
          Each test is assumed to clean up all DB content it entered.
 void assertCaseEnded(String caseInstanceId)
           
 void assertProcessEnded(String processInstanceId)
           
 void assertProcessNotEnded(String processInstanceId)
           
protected  void clearServiceReferences()
           
protected  void closeDownProcessEngine()
           
 void deployment(org.camunda.bpm.model.bpmn.BpmnModelInstance... bpmnModelInstances)
           
 void executeAvailableJobs()
           
protected  List<ActivityInstance> getInstancesForActivitiyId(ActivityInstance activityInstance, String activityId)
          Deprecated. 
protected  List<ActivityInstance> getInstancesForActivityId(ActivityInstance activityInstance, String activityId)
           
protected abstract  void initializeProcessEngine()
           
protected  void initializeServices()
           
protected  void runAsUser(String userId, List<String> groupIds, Runnable r)
           
 void runBare()
           
 void waitForJobExecutorOnCondition(long maxMillisToWait, Callable<Boolean> condition)
           
 void waitForJobExecutorOnCondition(long maxMillisToWait, long intervalMillis, Callable<Boolean> condition)
          Deprecated. 
 void waitForJobExecutorToProcessAllJobs(long maxMillisToWait)
           
 void waitForJobExecutorToProcessAllJobs(long maxMillisToWait, long intervalMillis)
          Deprecated. 
 
Methods inherited from class org.camunda.bpm.engine.impl.test.PvmTestCase
assertTextPresent, assertTextPresentIgnoreCase, runTest
 
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, setName, setUp, tearDown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

processEngine

protected ProcessEngine processEngine

threadRenderingMode

protected LogUtil.ThreadLogMode threadRenderingMode

deploymentId

protected String deploymentId

exception

protected 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
Constructor Detail

AbstractProcessEngineTestCase

public AbstractProcessEngineTestCase()
Method Detail

initializeProcessEngine

protected abstract void initializeProcessEngine()

closeDownProcessEngine

protected void closeDownProcessEngine()

runBare

public void runBare()
             throws Throwable
Overrides:
runBare in class junit.framework.TestCase
Throws:
Throwable

assertAndEnsureCleanDb

protected void assertAndEnsureCleanDb()
                               throws Throwable
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()

clearServiceReferences

protected void clearServiceReferences()

assertProcessEnded

public void assertProcessEnded(String processInstanceId)

assertProcessNotEnded

public void assertProcessNotEnded(String processInstanceId)

assertCaseEnded

public void assertCaseEnded(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,
                                                     Callable<Boolean> condition)
Deprecated. 


waitForJobExecutorOnCondition

public void waitForJobExecutorOnCondition(long maxMillisToWait,
                                          Callable<Boolean> condition)

executeAvailableJobs

public void executeAvailableJobs()

areJobsAvailable

public boolean areJobsAvailable()

getInstancesForActivitiyId

@Deprecated
protected List<ActivityInstance> getInstancesForActivitiyId(ActivityInstance activityInstance,
                                                                       String activityId)
Deprecated. 


getInstancesForActivityId

protected List<ActivityInstance> getInstancesForActivityId(ActivityInstance activityInstance,
                                                           String activityId)

runAsUser

protected void runAsUser(String userId,
                         List<String> groupIds,
                         Runnable r)

deployment

public void deployment(org.camunda.bpm.model.bpmn.BpmnModelInstance... bpmnModelInstances)


Copyright © 2015 camunda services GmbH. All rights reserved.