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
Implemented types

Constructors

LogicBlockFakeBinding()

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 handler to be invoked whenever an error of type TError is encountered.
inherited
onInput<TInput extends Object>(InputCallback<TInput> handler) → void
Registers a handler to be invoked whenever an input of type TInput is received.
inherited
onOutput<TOutput extends Object>(OutputCallback<TOutput> handler) → void
Registers a handler to be invoked whenever an output of type TOutput is produced.
inherited
onState<TStateType extends TState>(StateCallback<TStateType> handler) → void
Registers a handler to be invoked whenever a state of type TStateType is 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