MockTerminalOutput class
Mock output that captures all written content for assertions.
- Implemented types
Constructors
Properties
- allOutput → String
-
All output as a single string.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasTerminal → bool
-
Whether a terminal is attached to stdout.
no setteroverride
- lineCount → int
-
Number of writeln() calls made.
no setter
-
lines
→ List<
String> -
All individual writeln() calls (including the content).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- terminalColumns → int
-
The number of columns in the terminal.
no setteroverride
- terminalLines → int
-
The number of lines (rows) in the terminal.
no setteroverride
- writeCount → int
-
Number of write() calls made.
no setter
-
writes
→ List<
String> -
All individual write() calls.
no setter
Methods
-
contains(
String text) → bool - Check if output contains a string.
-
containsPattern(
Pattern pattern) → bool - Check if output contains a pattern.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Reset all output.
-
setDimensions(
{int? columns, int? rows}) → void - Set terminal dimensions.
-
setHasTerminal(
bool value) → void - Set whether terminal is available.
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
Object? object) → void -
Writes an object to the output without a trailing newline.
override
-
writeln(
[Object? object = '']) → void -
Writes an object to the output followed by a newline.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited