Package org.axonframework.test.fixture
Class MessagesRecordingConfigurationEnhancer
java.lang.Object
org.axonframework.test.fixture.MessagesRecordingConfigurationEnhancer
- All Implemented Interfaces:
ConfigurationEnhancer
@Internal
public class MessagesRecordingConfigurationEnhancer
extends Object
implements ConfigurationEnhancer
ConfigurationEnhancer that registers
RecordingEventStore, RecordingEventSink and
RecordingCommandBus. The recorded messages can then be used to assert expectations with test cases.
Recording decorators are registered as the innermost decorators (DECORATION_ORDER = Integer.MIN_VALUE)
so that they capture messages after dispatch interceptors have enriched them (e.g., with correlation
metadata).
The recording instances are stored in a RecordingComponentsRegistry that is registered as a regular
component. The fixture resolves the registry via
configuration.getComponent(RecordingComponentsRegistry.class) and reads the recording instances from it.
- Since:
- 5.0.0
- Author:
- Mateusz Nowak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenhance(ComponentRegistry registry) intorder()Returns the relative order this enhancer should be invoked in, compared to other instances.
-
Constructor Details
-
MessagesRecordingConfigurationEnhancer
public MessagesRecordingConfigurationEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
registry- The registry instance to enhance.
-
order
public int order()Description copied from interface:ConfigurationEnhancerReturns the relative order this enhancer should be invoked in, compared to other instances.Use lower (negative) values for enhancers providing sensible defaults, and higher values for enhancers that should be able to override values potentially previously set. Defaults to
0when not set.- Specified by:
orderin interfaceConfigurationEnhancer- Returns:
- The order in which this enhancer should be invoked.
-