ReplayProcessManager class

Fakes all process invocations by replaying a previously-recorded series of invocations.

Recordings exist as opaque directories that are produced by RecordingProcessManager.

Implemented types

Properties

location Directory
The location of the serialized recording that's driving this manager.
final
streamDelay Duration
If non-null, processes spawned by this manager will delay their stdout and stderr stream production by the this amount. See description of the associated parameter in create.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

canRun(dynamic executable, { String workingDirectory }) bool
Returns true if the executable exists and if it can be executed.
override
killPid(int pid, [ ProcessSignal signal = io.ProcessSignal.sigterm ]) bool
Kills the process with id pid. [...]
override
run(List command, { String workingDirectory, Map<String, String> environment, bool includeParentEnvironment: true, bool runInShell: false, Encoding stdoutEncoding: io.systemEncoding, Encoding stderrEncoding: io.systemEncoding }) Future<ProcessResult>
Starts a process and runs it non-interactively to completion. [...]
override
runSync(List command, { String workingDirectory, Map<String, String> environment, bool includeParentEnvironment: true, bool runInShell: false, Encoding stdoutEncoding: io.systemEncoding, Encoding stderrEncoding: io.systemEncoding }) ProcessResult
Starts a process and runs it to completion. This is a synchronous call and will block until the child process terminates. [...]
override
start(List command, { String workingDirectory, Map<String, String> environment, bool includeParentEnvironment: true, bool runInShell: false, ProcessStartMode mode: io.ProcessStartMode.normal }) Future<Process>
Starts a process by running the specified command. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Methods

create(Directory location, { Duration streamDelay: Duration.zero }) Future<ReplayProcessManager>
Creates a new ReplayProcessManager capable of replaying a recording that was serialized to the specified location by RecordingProcessManager. [...]