org.axonframework.test.saga
Interface ContinuedGivenState

All Superinterfaces:
WhenState
All Known Implementing Classes:
AnnotatedSagaTestFixture

public interface ContinuedGivenState
extends WhenState

Interface describing methods that can be executed after the first "given" state has been supplied. Either more "given" state can be appended, or a transition to the definition of "when" can be made.

Since:
1.1
Author:
Allard Buijze

Method Summary
 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.
 
Methods inherited from interface org.axonframework.test.saga.WhenState
whenAggregate, whenPublishingA, whenTimeAdvancesTo, whenTimeElapses
 

Method Detail

andThenAggregate

GivenAggregateEventPublisher andThenAggregate(Object aggregateIdentifier)
Use this method to indicate that an aggregate with given identifier published certain events.

Can be chained to build natural sentences:
andThenAggregate(someIdentifier).published(someEvents)

Parameters:
aggregateIdentifier - The identifier of the aggregate the events should appear to come from
Returns:
an object that allows registration of the actual events to send

andThenTimeElapses

ContinuedGivenState andThenTimeElapses(org.joda.time.Duration elapsedTime)
Simulate time shifts in the current given state. This can be useful when the time between given events is of importance.

Parameters:
elapsedTime - The amount of time that will elapse
Returns:
an object that allows registration of the actual events to send

andThenTimeAdvancesTo

ContinuedGivenState andThenTimeAdvancesTo(org.joda.time.DateTime newDateTime)
Simulate time shifts in the current given state. This can be useful when the time between given events is of importance.

Parameters:
newDateTime - The time to advance the clock to
Returns:
an object that allows registration of the actual events to send

andThenAPublished

ContinuedGivenState andThenAPublished(Object event)
Indicates that the given event has been published in the past. This event is sent to the associated sagas.

Parameters:
event - The event to publish
Returns:
an object that allows chaining of more given state


Copyright © 2010-2016. All Rights Reserved.