Package com.opencqrs.framework.command
Interface ExpectDsl
public interface ExpectDsl
DSL interfaces for the "Expect" (or "Then") phase of command handling tests. This phase specifies and verifies the
expected outcomes after command execution, including success/failure status, published events, result values, and
final state.
The Expect phase follows the When phase in the Given-When-Then test pattern. It provides a fluent API for asserting:
- Whether the command succeeded or failed via
ExpectDsl.Outcome - The command result and final instance state via
ExpectDsl.Succeeding - Exception types and precondition violations via
ExpectDsl.Failing - Published events via
ExpectDsl.AllandExpectDsl.Next
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFluent API for asserting against all captured events.static interfaceFluent API interface for validating individual captured events.static interfaceFluent API for assertions after failed command execution.static interfaceFluent API for asserting against events sequentially using a consuming cursor.static interfaceEntry point for specifying whether the command execution is expected to succeed or fail.static interfaceFluent API for assertions after successful command execution.