whenInitialStateIs<STATE extends Object, ACTION extends Object, MOCKS extends Object> function
StateCase<STATE, ACTION, MOCKS>
whenInitialStateIs<STATE extends Object, ACTION extends Object, MOCKS extends Object>(
- STATE initial, {
- required List<
ActionCase< actions,STATE, ACTION, MOCKS> >
Starts a transition specification from the given source state.
Use this as the Given part of a StateMachine test case. The actions list
should include every action that belongs to the public action set under
test, including invalid transitions.
Implementation
StateCase<STATE, ACTION, MOCKS> whenInitialStateIs<STATE extends Object,
ACTION extends Object, MOCKS extends Object>(
STATE initial, {
required List<ActionCase<STATE, ACTION, MOCKS>> actions,
}) {
return StateCase._(
initial: initial,
actions: actions,
);
}