givenSnapshots

fun ProcessorSpec.givenSnapshots(type: AggregateType, vararg states: Pair<String, Any>, tenantId: String = Caller.DEFAULT_TENANT): MemoryQueries

Serves the handlers' reads from a memoryQueries holding states, each an aggregate id to its state, as snapshots of type in tenantId. It replaces the queries given before: a spec that reads several types gives one memoryQueries.


fun <S : Any> ProcessorSpec.givenSnapshots(model: AggregateModel<S>, id: String, vararg events: Any, tenantId: String = Caller.DEFAULT_TENANT): MemoryQueries

Serves the handlers' reads from a memoryQueries holding the snapshot of the aggregate id of model in tenantId, in the state events leave it in (MemoryQueries.snapshot). It replaces the queries given before: a spec that reads several aggregates gives one memoryQueries.