public class FlowableEventRule extends Object implements org.junit.rules.TestRule
Usage:
public class YourTest {
@Rule
public FlowableFormRule flowableEventRule = new FlowableEventRule();
...
}
The EventRegistryEngine and the services will be made available to the test class through the getters of the FlowableRule. The dmnEngine will be initialized by default with the flowable.eventregistry.cfg.xml resource
on the classpath. To specify a different configuration file, pass the resource location in the appropriate constructor. Event registry engines will be cached statically.
Right before the first time the setUp is called for a given configuration resource, the event registry engine will be constructed.
You can declare a deployment with the EventDeploymentAnnotation annotation. This base class will make sure that this deployment gets deployed before the setUp and
EventRepositoryService.deleteDeployment(String) after the tearDown.
| Modifier and Type | Field and Description |
|---|---|
protected String |
configurationResource |
protected String |
deploymentId |
protected EventRegistryEngineConfiguration |
eventEngineConfiguration |
protected EventRegistryEngine |
eventRegistryEngine |
protected EventRepositoryService |
repositoryService |
| Constructor and Description |
|---|
FlowableEventRule() |
FlowableEventRule(EventRegistryEngine eventRegistryEngine) |
FlowableEventRule(String configurationResource) |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
Implementation based on
TestWatcher. |
protected void |
configureEventRegistryEngine() |
void |
EventRegistryEngineConfiguration(EventRegistryEngineConfiguration eventEngineConfiguration) |
protected void |
failed(Throwable e,
org.junit.runner.Description description)
Invoked when a test fails
|
protected void |
finished(org.junit.runner.Description description) |
String |
getConfigurationResource() |
EventRegistryEngine |
getEventRegistryEngine() |
EventRepositoryService |
getRepositoryService() |
protected void |
initializeEventRegistryEngine() |
protected void |
initializeServices() |
void |
setConfigurationResource(String configurationResource) |
void |
setEventRegistryEngine(EventRegistryEngine eventRegistryEngine) |
void |
setRepositoryService(EventRepositoryService repositoryService) |
protected void |
skipped(org.junit.internal.AssumptionViolatedException e,
org.junit.runner.Description description)
Invoked when a test is skipped due to a failed assumption.
|
protected void |
starting(org.junit.runner.Description description) |
protected void |
succeeded(org.junit.runner.Description description)
Invoked when a test succeeds
|
protected String configurationResource
protected String deploymentId
protected EventRegistryEngineConfiguration eventEngineConfiguration
protected EventRegistryEngine eventRegistryEngine
protected EventRepositoryService repositoryService
public FlowableEventRule()
public FlowableEventRule(String configurationResource)
public FlowableEventRule(EventRegistryEngine eventRegistryEngine)
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
TestWatcher.apply in interface org.junit.rules.TestRuleprotected void succeeded(org.junit.runner.Description description)
protected void failed(Throwable e, org.junit.runner.Description description)
protected void skipped(org.junit.internal.AssumptionViolatedException e,
org.junit.runner.Description description)
protected void starting(org.junit.runner.Description description)
protected void initializeEventRegistryEngine()
protected void initializeServices()
protected void configureEventRegistryEngine()
protected void finished(org.junit.runner.Description description)
public String getConfigurationResource()
public void setConfigurationResource(String configurationResource)
public EventRegistryEngine getEventRegistryEngine()
public void setEventRegistryEngine(EventRegistryEngine eventRegistryEngine)
public EventRepositoryService getRepositoryService()
public void setRepositoryService(EventRepositoryService repositoryService)
public void EventRegistryEngineConfiguration(EventRegistryEngineConfiguration eventEngineConfiguration)
Copyright © 2021 Flowable. All rights reserved.