public interface ContinuedGivenState
Modifier and Type | Method and Description |
---|---|
GivenAggregateEventPublisher |
andThenAggregate(Object 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(org.joda.time.DateTime newDateTime)
Simulate time shifts in the current given state.
|
ContinuedGivenState |
andThenTimeElapses(org.joda.time.Duration elapsedTime)
Simulate time shifts in the current given state.
|
WhenAggregateEventPublisher |
whenAggregate(Object aggregateIdentifier)
Use this method to indicate that an aggregate with given identifier should publish certain events, while
recording the outcome.
|
FixtureExecutionResult |
whenPublishingA(Object event)
Use this method to indicate an application is published, while recording the outcome.
|
FixtureExecutionResult |
whenTimeAdvancesTo(org.joda.time.DateTime newDateTime)
Mimic an elapsed time with no relevant activity for the Saga.
|
FixtureExecutionResult |
whenTimeElapses(org.joda.time.Duration elapsedTime)
Mimic an elapsed time with no relevant activity for the Saga.
|
GivenAggregateEventPublisher andThenAggregate(Object aggregateIdentifier)
andThenAggregate(someIdentifier).published(someEvents)
aggregateIdentifier
- The identifier of the aggregate the events should appear to come fromContinuedGivenState andThenTimeElapses(org.joda.time.Duration elapsedTime)
elapsedTime
- The amount of time that will elapseContinuedGivenState andThenTimeAdvancesTo(org.joda.time.DateTime newDateTime)
newDateTime
- The time to advance the clock toContinuedGivenState andThenAPublished(Object event)
event
has been published in the past. This event is sent to the associated
sagas.event
- The event to publishWhenAggregateEventPublisher whenAggregate(Object aggregateIdentifier)
FixtureConfiguration.givenAggregate(Object)
given} and
andThenAggregate(Object)
andThen} methods, this method will start recording activity on the EventBus
and CommandBus.
Can be chained to build natural sentences:whenAggregate(someIdentifier).publishes(anEvent)
Note that if you inject resources using FixtureConfiguration.registerResource(Object)
, you may need to
reset them yourself if they are manipulated by the Saga in the "given" stage of the test.aggregateIdentifier
- The identifier of the aggregate the events should appear to come fromFixtureExecutionResult whenPublishingA(Object event)
FixtureConfiguration.registerResource(Object)
, you may need to
reset them yourself if they are manipulated by the Saga in the "given" stage of the test.event
- the event to publishFixtureExecutionResult whenTimeElapses(org.joda.time.Duration elapsedTime)
FixtureConfiguration.registerResource(Object)
, you may need to
reset them yourself if they are manipulated by the Saga in the "given" stage of the test.elapsedTime
- The amount of time to elapseFixtureExecutionResult whenTimeAdvancesTo(org.joda.time.DateTime newDateTime)
FixtureConfiguration.registerResource(Object)
, you may need to
reset them yourself if they are manipulated by the Saga in the "given" stage of the test.newDateTime
- The time to advance the clock toCopyright © 2010-2013. All Rights Reserved.