ExpectStage

interface ExpectStage<S : Any>

Functions

Link copied to clipboard
abstract fun expect(expected: Consumer<ExpectedResult<S>>): ExpectStage<S>
Link copied to clipboard

open fun <E : Throwable> expectError(expected: Consumer<E>): ExpectStage<S>

3.3 期望产生异常

Link copied to clipboard
open fun <E : Throwable> expectErrorType(expected: Class<E>): ExpectStage<S>
Link copied to clipboard
open fun <E : Any> expectEvent(expected: Consumer<DomainEvent<E>>): ExpectStage<S>

期望的第一个领域事件

Link copied to clipboard
open fun <E : Any> expectEventBody(expected: Consumer<E>): ExpectStage<S>
Link copied to clipboard
open fun expectEventCount(expected: Int): ExpectStage<S>

期望产生的事件数量.

Link copied to clipboard
Link copied to clipboard

3.2 期望领域事件.

Link copied to clipboard
open fun expectEventType(vararg expected: Class<*>): ExpectStage<S>

期望事件类型. 严格按照事件生成顺序验证。

Link copied to clipboard
Link copied to clipboard
open fun expectState(expected: Consumer<S>): ExpectStage<S>
Link copied to clipboard

3.1 期望聚合状态.

Link copied to clipboard
abstract fun verify(): VerifiedStage<S>

完成流程编排后,执行验证逻辑.