AggregateDslContext
Context interface for managing shared state across aggregate DSL test stages.
This interface provides a mechanism to store and retrieve ExpectStage instances by reference, enabling complex test scenarios that need to branch or reference previous test states. It acts as a registry for verified test stages that can be reused in forked test scenarios.
Performance characteristics:
Storage: O(1) hash map operations
Retrieval: O(1) hash map operations
Memory: Minimal overhead per reference (typically < 1KB per ref)
Suitable for test scenarios with reasonable number of refs (< 100)
Parameters
S
the state type of the aggregate being tested