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

Inheritors

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Returns a set of all available reference names.

Link copied to clipboard
abstract fun getExpectStage(ref: String): ExpectStage<S>
Link copied to clipboard
abstract fun setExpectStage(ref: String, expectStage: ExpectStage<S>)