public interface ContinuedGivenState extends WhenState
Modifier and Type | Method and Description |
---|---|
GivenAggregateEventPublisher |
andThenAggregate(String aggregateIdentifier)
Use this method to indicate that an aggregate with given identifier published certain events.
|
ContinuedGivenState |
andThenAPublished(Object event)
Indicates that the given
event has been published in the past. |
ContinuedGivenState |
andThenTimeAdvancesTo(Instant newDateTime)
Simulate time shifts in the current given state.
|
ContinuedGivenState |
andThenTimeElapses(Duration elapsedTime)
Simulate time shifts in the current given state.
|
whenAggregate, whenPublishingA, whenTimeAdvancesTo, whenTimeElapses
GivenAggregateEventPublisher andThenAggregate(String aggregateIdentifier)
andThenAggregate(someIdentifier).published(someEvents)
aggregateIdentifier
- The identifier of the aggregate the events should appear to come fromContinuedGivenState andThenTimeElapses(Duration elapsedTime) throws Exception
elapsedTime
- The amount of time that will elapseException
- if an exception happens when the duration elapsesContinuedGivenState andThenTimeAdvancesTo(Instant newDateTime) throws Exception
newDateTime
- The time to advance the clock toException
- if an exception happens when the time advancesContinuedGivenState andThenAPublished(Object event)
event
has been published in the past. This event is sent to the associated
sagas.event
- The event to publishException
- if an exception happens when the event is handledCopyright © 2010–2018. All rights reserved.