Class ProcessEngineTestCase
- java.lang.Object
- 
- junit.framework.Assert
- 
- junit.framework.TestCase
- 
- org.camunda.bpm.engine.test.ProcessEngineTestCase
 
 
 
- 
- All Implemented Interfaces:
- junit.framework.Test
 
 public class ProcessEngineTestCase extends junit.framework.TestCaseConvenience for ProcessEngine and services initialization in the form of a JUnit base class.Usage: public class YourTest extends ProcessEngineTestCaseThe ProcessEngine and the services available to subclasses through protected member fields. The processEngine will be initialized by default with the camunda.cfg.xml resource on the classpath. To specify a different configuration file, override the getConfigurationResource()method. Process engines will be cached statically. The first time the setUp is called for a given configuration resource, the process engine will be constructed.You can declare a deployment with the Deploymentannotation. This base class will make sure that this deployment gets deployed in the setUp andcascade deletedin the tearDown.This class also lets you set the current time used by the process engine. This can be handy to control the exact time that is used by the engine in order to verify e.g. e.g. due dates of timers. Or start, end and duration times in the history service. In the tearDown, the internal clock will automatically be reset to use the current system time rather then the time that was set during a test method. In other words, you don't have to clean up your own time messing mess ;-)- Author:
- Tom Baeyens, Falko Menge (camunda)
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected AuthorizationServiceauthorizationServiceprotected CaseServicecaseServiceprotected StringconfigurationResourceprotected StringconfigurationResourceCompatprotected StringdeploymentIdprotected FilterServicefilterServiceprotected FormServiceformServiceprotected HistoryServicehistoricDataServiceDeprecated.protected HistoryServicehistoryServiceprotected IdentityServiceidentityServiceprotected ManagementServicemanagementServiceprotected ProcessEngineprocessEngineprotected RepositoryServicerepositoryServiceprotected RuntimeServiceruntimeServiceprotected booleanskipTestprotected TaskServicetaskService
 - 
Constructor SummaryConstructors Constructor Description ProcessEngineTestCase()uses 'camunda.cfg.xml' as it's configuration resource
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertProcessEnded(String processInstanceId)static voidcloseProcessEngines()StringgetConfigurationResource()protected voidinitializeProcessEngine()protected voidinitializeServices()protected voidrunTest()voidsetConfigurationResource(String configurationResource)voidsetCurrentTime(Date currentTime)protected voidsetUp()protected voidtearDown()- 
Methods inherited from class junit.framework.TestCaseassertEquals, 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, runBare, setName, toString
 
- 
 
- 
- 
- 
Field Detail- 
configurationResourceprotected String configurationResource 
 - 
configurationResourceCompatprotected String configurationResourceCompat 
 - 
deploymentIdprotected String deploymentId 
 - 
processEngineprotected ProcessEngine processEngine 
 - 
repositoryServiceprotected RepositoryService repositoryService 
 - 
runtimeServiceprotected RuntimeService runtimeService 
 - 
taskServiceprotected TaskService taskService 
 - 
historicDataService@Deprecated protected HistoryService historicDataService Deprecated.
 - 
historyServiceprotected HistoryService historyService 
 - 
identityServiceprotected IdentityService identityService 
 - 
managementServiceprotected ManagementService managementService 
 - 
formServiceprotected FormService formService 
 - 
filterServiceprotected FilterService filterService 
 - 
authorizationServiceprotected AuthorizationService authorizationService 
 - 
caseServiceprotected CaseService caseService 
 - 
skipTestprotected boolean skipTest 
 
- 
 - 
Method Detail- 
assertProcessEndedpublic void assertProcessEnded(String processInstanceId) 
 - 
setUpprotected void setUp() throws Exception- Overrides:
- setUpin class- junit.framework.TestCase
- Throws:
- Exception
 
 - 
runTestprotected void runTest() throws Throwable- Overrides:
- runTestin class- junit.framework.TestCase
- Throws:
- Throwable
 
 - 
initializeProcessEngineprotected void initializeProcessEngine() 
 - 
initializeServicesprotected void initializeServices() 
 - 
tearDownprotected void tearDown() throws Exception- Overrides:
- tearDownin class- junit.framework.TestCase
- Throws:
- Exception
 
 - 
closeProcessEnginespublic static void closeProcessEngines() 
 - 
setCurrentTimepublic void setCurrentTime(Date currentTime) 
 - 
getConfigurationResourcepublic String getConfigurationResource() 
 - 
setConfigurationResourcepublic void setConfigurationResource(String configurationResource) 
 
- 
 
-