Package com.flowable.app.engine.test
Class FlowableAppExtension
- java.lang.Object
-
- com.flowable.app.engine.test.FlowableAppExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterEachCallback,org.junit.jupiter.api.extension.BeforeEachCallback,org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.ParameterResolver
public class FlowableAppExtension extends Object implements org.junit.jupiter.api.extension.ParameterResolver, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
JUnit Jupiter extension for the Flowable AppEngine and services initialization.Usage:
@ExtendWith(FlowableAppExtension.class) class YourTest { @BeforeEach void setUp(AppEngine appEngine) { ... } @Test void myTest(AppRepositoryService appRepositoryService) { ... } ... }The AppEngine and the services will be made available to the test class through the parameter resolution (BeforeEach, AfterEach, test methods). The AppEngine will be fetched as a bean through the
SpringExtensionYou can declare a deployment with the
AppDeploymentannotation. This extension will make sure that this deployment gets deployed before the setUp andAppRepositoryService.deleteDeployment(String, boolean)deleted} after the tearDown. The id of the deployment can be accessed by usingAppDeploymentIdin a test method.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description FlowableAppExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterEach(org.junit.jupiter.api.extension.ExtensionContext context)voidbeforeEach(org.junit.jupiter.api.extension.ExtensionContext context)protected AppEnginecreateAppEngine(org.junit.jupiter.api.extension.ExtensionContext context)protected org.junit.jupiter.api.extension.ExtensionContext.StoregetStore(org.junit.jupiter.api.extension.ExtensionContext context)protected FlowableAppTestHelpergetTestHelper(org.junit.jupiter.api.extension.ExtensionContext context)ObjectresolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext context)booleansupportsParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext context)
-
-
-
Method Detail
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
- Specified by:
beforeEachin interfaceorg.junit.jupiter.api.extension.BeforeEachCallback
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context)
- Specified by:
afterEachin interfaceorg.junit.jupiter.api.extension.AfterEachCallback
-
supportsParameter
public boolean supportsParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext context)- Specified by:
supportsParameterin interfaceorg.junit.jupiter.api.extension.ParameterResolver
-
resolveParameter
public Object resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext context)
- Specified by:
resolveParameterin interfaceorg.junit.jupiter.api.extension.ParameterResolver
-
getTestHelper
protected FlowableAppTestHelper getTestHelper(org.junit.jupiter.api.extension.ExtensionContext context)
-
createAppEngine
protected AppEngine createAppEngine(org.junit.jupiter.api.extension.ExtensionContext context)
-
getStore
protected org.junit.jupiter.api.extension.ExtensionContext.Store getStore(org.junit.jupiter.api.extension.ExtensionContext context)
-
-