Struct Recorded<T>
A single timestamped notification (next/error/complete), stamped with a VirtualTimeScheduler's clock value at the moment it happened. The core assertion unit of marble testing: a test records a sequence of these from a live subscription (see Record<T>(Observable<T>)), advances the scheduler, then compares the recorded sequence against an expected one built from these same factory methods (or parsed from a marble diagram, whose messages are also Recorded<T> values).
public readonly struct Recorded<T> : IEquatable<Recorded<T>>
Type Parameters
TThe type of value carried by an OnNext notification.
- Implements
-
IEquatable<Recorded<T>>
Properties
Error
public Exception? Error { get; }
Property Value
- Exception?
Kind
Gets which kind of notification this is.
public RecordedKind Kind { get; }
Property Value
Time
Gets the virtual-clock time the notification was recorded at.
public TimeSpan Time { get; }
Property Value
- TimeSpan
Value
Gets the emitted value, for an OnNext notification; otherwise the default value.
public T? Value { get; }
Property Value
- T
Methods
Equals(Recorded<T>)
Determines whether this notification matches another (errors compare by type and message, not reference).
public bool Equals(Recorded<T> other)
Parameters
otherRecorded<T>The notification to compare against.
Returns
- bool
true if the two notifications match.
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject?
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
ToString()
public override string ToString()
Returns
- string