TerminiceTester class
Opt-in harness for testing high-level Terminice CLIs.
The tester owns a MockTerminal, configures a Terminice instance to use it, and restores the previous TerminalContext terminal after every run.
Constructors
-
TerminiceTester.fallback({Terminice? base, Iterable<
String> lines = const [], int columns = 80, int rows = 24}) -
Creates a tester that always exercises high-level line-mode fallback.
factory
- TerminiceTester.interactive({Terminice? base, TerminalScript? script, int columns = 80, int rows = 24})
-
Creates a tester for rich interactive prompts.
factory
-
TerminiceTester.nonInteractive({Terminice? base, Iterable<
String> lines = const [], int columns = 80, int rows = 24}) -
Creates a tester whose terminal streams report that no TTY is available.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- output → TerminalOutputSnapshot
-
Captured output from this tester's terminal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- terminal → MockTerminal
-
Fake terminal used for input, output, and terminal capability checks.
final
- terminice → Terminice
-
Terminice instance configured for this tester's terminal and mode.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queue(
TerminalScript script) → void - Adds scripted terminal input after construction.
-
run<
T> (T body(Terminice t)) → T -
Runs
bodywith this tester's terminal active. -
runAsync<
T> (FutureOr< T> body(Terminice t)) → Future<T> -
Runs asynchronous
bodywith this tester's terminal active. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited