DefaultExpectDsl
Default implementation of the ExpectDsl interface for defining aggregate test expectations.
This class provides methods to specify various expectations about the outcome of aggregate operations, including state changes, events, and error conditions. It wraps an ExpectStage and converts expectations into JUnit 5 dynamic tests that can be executed dynamically.
Parameters
the state type of the aggregate being tested
Properties
Functions
Expects a specific error with detailed validation using a Consumer.
Defines expectation that an error occurred during command processing.
Defines expectations for a specific error that occurred.
Expects specific conditions on the first domain event using a Consumer.
Defines expectations for a specific domain event.
Defines expectations for the number of domain events produced.
Expects specific conditions on an event iterator using a Consumer.
Defines expectations for iterating through domain events.
Expects specific conditions on the domain event stream using a Consumer.
Defines expectations for the complete domain event stream.
Expects events of specific types in the exact order provided (Java-friendly overload).
Defines expectations for the types of domain events produced.
Defines expectation that no error occurred during command processing.
Defines expectations for the aggregate's state using a Consumer.
Defines expectations for the aggregate's state object.
Defines expectations for the aggregate's complete state including metadata.