LogicBlockFakeBinding<TState extends StateLogic<TState> > class
final
A fake binding for testing logic block bindings without a real logic block.
Allows manually dispatching states, inputs, outputs, and errors to verify that binding callbacks are invoked correctly.
- Inheritance
-
- Object
- LogicBlockListener<
TState> - LogicBlockFakeBinding
- Implemented types
-
- LogicBlockBinding<
TState>
- LogicBlockBinding<
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addError(
Object error) → void - Simulates an error, invoking any matching error callbacks.
-
cleanup(
) → void -
Called during dispose to release any resources held by the listener.
inherited
-
dispose(
) → void -
Disposes the listener, invoking cleanup if not already disposed.
inherited
-
input<
TInput extends Object> (TInput input) → void -
Simulates receiving an input of type
TInput, invoking any matching input callbacks. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError<
TError> (ErrorCallback< TError> handler) → void -
Registers a
handlerto be invoked whenever an error of typeTErroris encountered.inherited -
onInput<
TInput extends Object> (InputCallback< TInput> handler) → void -
Registers a
handlerto be invoked whenever an input of typeTInputis received.inherited -
onOutput<
TOutput extends Object> (OutputCallback< TOutput> handler) → void -
Registers a
handlerto be invoked whenever an output of typeTOutputis produced.inherited -
onState<
TStateType extends TState> (StateCallback< TStateType> handler) → void -
Registers a
handlerto be invoked whenever a state of typeTStateTypeis encountered.inherited -
output<
TOutput extends Object> (TOutput output) → void -
Simulates producing an output of type
TOutput, invoking any matching output callbacks. -
receiveError(
Object error) → void -
Called whenever the logic block encounters an
error.inherited -
receiveInput<
TInput extends Object> (TInput input) → void -
Called whenever the logic block receives an input of type
TInput.inherited -
receiveOutput<
TOutput extends Object> (TOutput output) → void -
Called whenever the logic block produces an output of type
TOutput.inherited -
receiveState(
TState state) → void -
Called whenever the logic block transitions to a new
state.inherited -
setState(
TState state) → void -
Simulates a state change to
state, invoking any matching state callbacks. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited