Class WorkflowTestEventPublicationEnhancer
java.lang.Object
io.axoniq.framework.workflow.runtime.test.configuration.WorkflowTestEventPublicationEnhancer
- All Implemented Interfaces:
ConfigurationEnhancer
Test configuration enhancer that installs workflow test event-publication components.
This enhancer adds the supporting infrastructure used by workflow tests that need to publish events through the same event pipeline as the runtime while keeping publication deterministic and observable. It registers three components:
- a
RecordingIdGeneratoras the testIdGenerator, so generated event ids can be inspected - a
TestEventPublisher, which publishes payloads or event messages through the configuredEventSinkusing the activeMessageTypeResolver,EventConverter, clock, and that generator - a
DelayedPublisher, which can schedule those test events on the configured workflow executor
Use this enhancer when a test should drive workflows by publishing real events, especially when the test also needs access to generated ids or delayed event publication. It is commonly used by higher-level workflow test infrastructure and can also be registered directly in custom test configurations.
- Since:
- 5.4.0
- Author:
- Simon Zambrovski
-
Constructor Details
-
WorkflowTestEventPublicationEnhancer
public WorkflowTestEventPublicationEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
registry- The registry instance to enhance.
-