Package org.flowable.engine.impl.test
Class ResourceFlowableExtension
java.lang.Object
org.flowable.engine.impl.test.InternalFlowableExtension
org.flowable.engine.impl.test.ResourceFlowableExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback
,org.junit.jupiter.api.extension.AfterEachCallback
,org.junit.jupiter.api.extension.BeforeEachCallback
,org.junit.jupiter.api.extension.Extension
,org.junit.jupiter.api.extension.ParameterResolver
,org.junit.jupiter.api.extension.TestInstantiationAwareExtension
An extension that uses the configured resource to create a
ProcessEngine
.
This extension needs to be registered via RegisterExtension
. It additionally allows for
customizing the ProcessEngineConfiguration
A new ProcessEngine
will be created for each test.- Author:
- Filip Hrisafov
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.TestInstantiationAwareExtension
org.junit.jupiter.api.extension.TestInstantiationAwareExtension.ExtensionContextScope
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Consumer
<ProcessEngineConfiguration> protected final String
protected org.junit.jupiter.api.extension.ExtensionContext
protected final String
Fields inherited from class org.flowable.engine.impl.test.InternalFlowableExtension
ANNOTATION_DEPLOYMENT_ID_KEY, logger
-
Constructor Summary
ConstructorsConstructorDescriptionResourceFlowableExtension
(String configurationResource, String processEngineName, Consumer<ProcessEngineConfiguration> configurationConsumer) ResourceFlowableExtension
(String configurationResource, Consumer<ProcessEngineConfiguration> configurationConsumer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterEach
(org.junit.jupiter.api.extension.ExtensionContext context) void
beforeEach
(org.junit.jupiter.api.extension.ExtensionContext context) protected ProcessEngine
getProcessEngine
(org.junit.jupiter.api.extension.ExtensionContext context) protected org.junit.jupiter.api.extension.ExtensionContext.Store
getStore
(org.junit.jupiter.api.extension.ExtensionContext context) protected ProcessEngine
Methods inherited from class org.flowable.engine.impl.test.InternalFlowableExtension
afterAll, assertAndEnsureCleanDb, cleanTestAndAssertAndEnsureCleanDb, doFinally, removeDeployments, resolveParameter, supportsParameter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.junit.jupiter.api.extension.TestInstantiationAwareExtension
getTestInstantiationExtensionContextScope
-
Field Details
-
configurationResource
-
processEngineName
-
configurationConsumer
-
currentExtensionContext
protected org.junit.jupiter.api.extension.ExtensionContext currentExtensionContext
-
-
Constructor Details
-
ResourceFlowableExtension
public ResourceFlowableExtension(String configurationResource, Consumer<ProcessEngineConfiguration> configurationConsumer) -
ResourceFlowableExtension
public ResourceFlowableExtension(String configurationResource, String processEngineName, Consumer<ProcessEngineConfiguration> configurationConsumer)
-
-
Method Details
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) - Specified by:
beforeEach
in interfaceorg.junit.jupiter.api.extension.BeforeEachCallback
- Overrides:
beforeEach
in classInternalFlowableExtension
-
afterEach
- Specified by:
afterEach
in interfaceorg.junit.jupiter.api.extension.AfterEachCallback
- Overrides:
afterEach
in classInternalFlowableExtension
- Throws:
Exception
-
getProcessEngine
- Specified by:
getProcessEngine
in classInternalFlowableExtension
-
initializeProcessEngine
-
getStore
protected org.junit.jupiter.api.extension.ExtensionContext.Store getStore(org.junit.jupiter.api.extension.ExtensionContext context) - Specified by:
getStore
in classInternalFlowableExtension
-
rebootEngine
-