public class FlowableAppExtension extends Object implements org.junit.jupiter.api.extension.ParameterResolver, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
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 SpringExtension
You can declare a deployment with the AppDeployment
annotation. This extension will make sure that this deployment gets deployed
before the setUp and AppRepositoryService.deleteDeployment(String, boolean)
deleted} after the tearDown.
The id of the deployment can be accessed by using AppDeploymentId
in a test method.
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
FlowableAppExtension() |
Modifier and Type | Method and Description |
---|---|
void |
afterEach(org.junit.jupiter.api.extension.ExtensionContext context) |
void |
beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) |
protected AppEngine |
createAppEngine(org.junit.jupiter.api.extension.ExtensionContext context) |
protected org.junit.jupiter.api.extension.ExtensionContext.Store |
getStore(org.junit.jupiter.api.extension.ExtensionContext context) |
protected FlowableAppTestHelper |
getTestHelper(org.junit.jupiter.api.extension.ExtensionContext context) |
Object |
resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext,
org.junit.jupiter.api.extension.ExtensionContext context) |
boolean |
supportsParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext,
org.junit.jupiter.api.extension.ExtensionContext context) |
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
beforeEach
in interface org.junit.jupiter.api.extension.BeforeEachCallback
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context)
afterEach
in interface org.junit.jupiter.api.extension.AfterEachCallback
public boolean supportsParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext context)
supportsParameter
in interface org.junit.jupiter.api.extension.ParameterResolver
public Object resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext context)
resolveParameter
in interface org.junit.jupiter.api.extension.ParameterResolver
protected FlowableAppTestHelper getTestHelper(org.junit.jupiter.api.extension.ExtensionContext context)
protected AppEngine createAppEngine(org.junit.jupiter.api.extension.ExtensionContext context)
protected org.junit.jupiter.api.extension.ExtensionContext.Store getStore(org.junit.jupiter.api.extension.ExtensionContext context)