Class AbstractWorkflowTestBase<T extends WorkflowContext>
java.lang.Object
io.axoniq.framework.workflow.runtime.test.AbstractWorkflowTestBase<T>
- Type Parameters:
T- type of the workflow context.
Abstract test base for workflow test, until we develop a test fixture.
- Since:
- 5.4.0
- Author:
- Simon Zambrovski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AxonConfigurationprotected DelayedPublisherprotected final org.slf4j.Loggerprotected final WorkflowTestDriverprotected WorkflowCancellationServiceprotected WorkflowEngineprotected WorkflowHistoryRepositoryprotected WorkflowConfigurationRegistry<?> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractWorkflowTestBase(Class<T> dslType, ComponentBuilder<WorkflowContextFactory<T>> contextFactoryBuilder) Creates a new test base. -
Method Summary
Modifier and TypeMethodDescriptionprotected UnaryOperator<WorkflowConfigurer> Allows further customization before the start of the configurer.protected List<Function<WorkflowModule.WorkflowDefinitionPhase.DetectionPhase<T>, WorkflowModule.WorkflowDefinitionPhase.FinalizedPhase<T>>> Override to register additional workflow definitions alongsidegetDeclaredDefinition()into the same module.protected abstract Function<WorkflowModule.WorkflowDefinitionPhase.DetectionPhase<T>, WorkflowModule.WorkflowDefinitionPhase.FinalizedPhase<T>>
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
testDriver
-
configuration
-
workflowEngine
-
workflowCancellationService
-
delayedPublisher
-
workflowRegistry
-
workflowHistoryRepository
-
-
Constructor Details
-
AbstractWorkflowTestBase
public AbstractWorkflowTestBase(Class<T> dslType, ComponentBuilder<WorkflowContextFactory<T>> contextFactoryBuilder) Creates a new test base.- Parameters:
dslType- dsl type to usecontextFactoryBuilder- context factory builder
-
-
Method Details
-
configure
Allows further customization before the start of the configurer.- Returns:
- modified configurer
-
getDeclaredDefinition
protected abstract Function<WorkflowModule.WorkflowDefinitionPhase.DetectionPhase<T>,WorkflowModule.WorkflowDefinitionPhase.FinalizedPhase<T>> getDeclaredDefinition() -
getAdditionalDefinitions
protected List<Function<WorkflowModule.WorkflowDefinitionPhase.DetectionPhase<T>,WorkflowModule.WorkflowDefinitionPhase.FinalizedPhase<T>>> getAdditionalDefinitions()Override to register additional workflow definitions alongsidegetDeclaredDefinition()into the same module. Use for multi-version test scenarios where two or more versions of a workflow need to share one engine and registry (the production wiring for Spring Boot autoconfig).- Returns:
- additional definitions, defaults to empty list.
-