ScriptedDetector<C, K extends Object> class

A detector whose findings the test scripts, so a tracker's own behaviour — not any real detector's — is what is under test.

Inheritance

Constructors

ScriptedDetector(String id, {Listenable? listenable, Stream<Object?>? stream, List<TrackedChange<K>> changes = const [], DetectorRole role = DetectorRole.describing, bool throwOnStart = false, bool throwOnDiff = false})
Creates a scripted detector.

Properties

changes List<TrackedChange<K>>
What DetectorSession.diff reports. Reassign between diffs to script a sequence.
getter/setter pair
diffCount int
How many times a diff ran.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
Identifies this detector within a tracker. Must be unique.
final
listenable Listenable?
Subscribed by the tracker, if given.
final
role DetectorRole
Whether this detector describes changes or backstops them.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startCount int
How many times a baseline was captured.
getter/setter pair
stream Stream<Object?>?
Subscribed by the tracker, if given.
final
throwOnDiff bool
Makes diff throw, to exercise degradation.
getter/setter pair
throwOnStart bool
Makes start throw, to exercise degradation.
getter/setter pair

Methods

listenables(C sources) Iterable<Listenable>
Listenables whose notifications mean the live state may have moved.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start(C sources) DetectorSession<C, K>
Captures the baseline and returns a session that can diff against it.
override
streams(C sources) Iterable<Stream<Object?>>
Streams whose events mean the live state may have moved.
override
toString() String
A string representation of this object.
inherited

Operators

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