StdoutService class

Service to simulate stdout. Use it in unit tests.

Constructors

StdoutService({bool mock = false})
The default and only constructor where you can indicate

Properties

hashCode → int
The hash code for this object.
no setterinherited
mock ↔ bool
Indicates if this StdoutService is in mock mode, see also StdinService.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getOutput() → List
This returns the stdout as a list. Empty strings at the end are removed. For a string version see getStringOutput
getStringOutput() → String
Calls getOutput and joins the returned list using the newline character ('\n').
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
write(String str) → void
Use this to write a string, whether in mock mode or with real stdout.
writeln(String str) → void
Use this to write a string with a trailing newline ('\n'). Whether in mock mode or with real stdout.

Operators

operator ==(Object other) → bool
The equality operator.
inherited