public class StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder
extends java.lang.Object
Constructor and Description |
---|
StateMachineTestPlanStepBuilder() |
public StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectState(S state)
S
.state
- the statepublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectStates(S... states)
S
.states
- the statespublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder sendEvent(E event)
E
. In case multiple state machines
exists, a random one will be chosen to send this event.
Multiple events can be defined which are then send in
defined order.event
- the eventpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder sendEvent(E event, boolean sendToAll)
E
. If sendToAll
is set to TRUE
event
will be send to all existing machines. Multiple events can be defined
which are then send in defined order.event
- the eventsendToAll
- send to all machinespublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder sendEvent(E event, boolean sendToAll, boolean sendParallel)
E
. If sendToAll
is set to TRUE
event
will be send to all existing machines. If sendPalallel
is set to
TRUE
event to all machines will be send by parallel threads.
Multiple events can be defined which are then send in defined order.event
- the eventsendToAll
- send to all machinessendParallel
- send event parallelpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder sendEvent(E event, java.lang.Object machineId)
E
into a state machine identified
by machineId
. Multiple events can be defined
which are then send in defined order.event
- the eventmachineId
- the machine identifier for sending eventpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder sendEvent(org.springframework.messaging.Message<E> event)
Message<E>
. In case multiple state machines
exists, a random one will be chosen to send this event. Multiple
events can be defined which are then send in defined order.event
- the eventpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder sendEvent(org.springframework.messaging.Message<E> event, boolean sendToAll)
Message<E>
. If sendToAll
is set to TRUE
event
will be send to all existing machines.Multiple events can be defined which are
then send in defined order.event
- the eventsendToAll
- send to all machinespublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder sendEvent(org.springframework.messaging.Message<E> event, java.lang.Object machineId)
Message<E>
into a state machine identified
by machineId
. Multiple events can be defined which are then
send in defined order.event
- the eventmachineId
- the machine identifier for sending eventpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectVariable(java.lang.Object key)
key
- the keypublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectVariableWith(org.hamcrest.Matcher<java.util.Map<? extends java.lang.Object,?>> matcher)
Matcher
.matcher
- the matcherpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectVariable(java.lang.Object key, java.lang.Object value)
key
- the keyvalue
- the valuepublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectStateChanged(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectStateEntered(S... states)
states
- the states enteredpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectStateExited(S... states)
states
- the states exitedpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectStateEntered(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectStateExited(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectEventNotAccepted(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectTransition(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectTransitionStarted(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectTransitionEnded(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectStateMachineStarted(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectStateMachineStopped(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder.StateMachineTestPlanStepBuilder expectExtendedStateChanged(int count)
count
times.count
- the countpublic StateMachineTestPlanBuilder<S,E> and()
StateMachineTestPlanBuilder
for chaining.