CommandElement class

A command element capable of holding both a raw and sanitized value.

Instances of this type can be used in the command list of the ProcessManager.start, ProcessManager.run, and ProcessManager.runSync methods.

Each command element has:

  • A raw value, which is the value that should passed to the underlying operating system to invoke the process.
  • A sanitized value, which is the value that's serialized when used with RecordingProcessManager and looked up in the replay log when used with ReplayProcessManager. Sanitized values typically will remove user-specific segments (such as the user's home directory) or random segments (such as temporary file names). Sanitizing values allows you to guarantee determinism in your process invocation lookups, thus removing flakiness in tests.

This class implements toString to return the element's raw value, meaning instances of this class can be passed directly to LocalProcessManager and will work as intended.

Constructors

CommandElement(String raw, { CommandSanitizer sanitizer })
Creates a new command element with the specified raw value. [...]

Properties

raw String
This command element's raw, unsanitized, value. [...]
final
sanitized String
This command element's sanitized value. [...]
read-only
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

toString() String
Returns a string representation of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

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