MockStateMachine<STATE extends Object, ACTION extends Object> class
This is a mock implementation of StateMachine that can be used for testing
- Implemented types
-
- StateMachine<
STATE, ACTION>
- StateMachine<
Constructors
- MockStateMachine(STATE initialState)
- Creates a mock state machine.
Properties
-
dispatchedActions
→ List<
ACTION> -
The actions that have been dispatched to the state machine.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → STATE
-
The current state of the state machine.
no setteroverride
-
stateStream
→ Stream<
STATE> -
A stream of the state machine's state.
no setteroverride
Methods
-
close(
) → void -
Closes the state machine and releases resources.
override
-
dispatch(
ACTION action) → void -
Dispatches an action to the state machine.
override
-
expectLatestDispatch(
ACTION action) → void - The latest action that was dispatched to the state machine.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited