Table of Contents

Struct Recorded<T>

Namespace
RxSharp.Testing
Assembly
RxSharp.dll

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

T

The type of value carried by an OnNext notification.

Implements
IEquatable<Recorded<T>>

Properties

Error

Gets the error, for an OnError notification; otherwise null.

public Exception? Error { get; }

Property Value

Exception?

Kind

Gets which kind of notification this is.

public RecordedKind Kind { get; }

Property Value

RecordedKind

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

other Recorded<T>

The notification to compare against.

Returns

bool

true if the two notifications match.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string