MockTerminal class
A mock terminal implementation for testing.
Captures all output and allows queuing input bytes/lines for testing interactive prompts without a real terminal.
- Implemented types
- Available extensions
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- input → MockTerminalInput
-
The input stream for reading key events and managing terminal modes.
no setteroverride
- mockInput → MockTerminalInput
-
Access to the mock input for test setup.
no setter
- mockOutput → MockTerminalOutput
-
Access to the mock output for assertions.
no setter
- output → MockTerminalOutput
-
The output stream for writing content and querying terminal dimensions.
no setteroverride
- outputSnapshot → TerminalOutputSnapshot
-
Available on MockTerminal, provided by the MockTerminalSnapshotExtension extension
Captures the current output buffer.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queueScript(
TerminalScript script) → void -
Available on MockTerminal, provided by the MockTerminalScriptExtension extension
Queuesscripton this terminal's mock input. -
reset(
) → void - Resets both input queue and output buffer.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited