FakeCommandRunner class final

In-memory CommandRunner for unit tests. Records calls in callLog (in invocation order) and returns the configurable values nextOverrideResult / nextExecuteResult.

Implemented types

Constructors

FakeCommandRunner({CoreResult? nextOverrideResult, CoreResult? nextExecuteResult})

Properties

callLog List<String>
All calls in interleaved order. Each entry is one of:
final
executedCommands List<CoreCommand>
Commands passed to execute, in call order.
final
hashCode int
The hash code for this object.
no setterinherited
nextExecuteResult ↔ CoreResult?
What execute returns next. Defaults to a generic success with no data — override per test for specific outcomes.
getter/setter pair
nextOverrideResult ↔ CoreResult?
What applyConnectionOverride returns next. null = no override (default). Non-null = short-circuit failure.
getter/setter pair
overrideArguments List<Map<String, Object?>?>
Arguments passed to applyConnectionOverride, in call order.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyConnectionOverride(Map<String, Object?>? arguments) Future<CoreResult?>
Apply a per-call connection override from a raw argument map.
override
execute(CoreCommand command) Future<CoreResult>
Execute command through the full executor pipeline.
override
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