FlowScoreboard<PayloadType, KeyType> class

Compares expected and observed payload flows.

Constructors

FlowScoreboard.perKey({required KeyType keyOf(PayloadType value), bool equals(PayloadType expected, PayloadType actual)?})
Creates a scoreboard that requires FIFO order independently per key.
factory
FlowScoreboard.strict({bool equals(PayloadType expected, PayloadType actual)?})
Creates a scoreboard that requires global FIFO order.
factory
FlowScoreboard.unordered({bool equals(PayloadType expected, PayloadType actual)?})
Creates a scoreboard that compares an unordered multiset.
factory

Properties

failures → List<FlowFailure<PayloadType>>
Failures accumulated while observing payloads.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isComplete → bool
Whether every expectation has been matched.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

expect(PayloadType value) → void
Adds one expected payload.
expectAll(Iterable<PayloadType> values) → void
Adds all values as expectations in iteration order.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe(PayloadType value, {required int cycle, required String endpoint}) → void
Compares one observed value against outstanding expectations.
toString() → String
A string representation of this object.
inherited
verifyComplete({int? cycle, String endpoint = 'scoreboard'}) → List<FlowFailure<PayloadType>>
Returns failures for all expectations that remain unmatched.

Operators

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