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

Constructors

MockTerminal()

Properties

hashCode int
The hash code for this object.
no setterinherited
input TerminalInput
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 TerminalOutput
The output stream for writing content and querying terminal dimensions.
no setteroverride
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
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