TestUtils Class

Namespace
ReactiveUI.Testing
Base Types
  • object
graph BT Type-->Base0["object"] Type["TestUtils"] class Type type-node

Syntax

public static class TestUtils

Methods

Name Value Summary
AdvanceByMs(TestScheduler, double) void
AdvanceByMs moves the TestScheduler along by the specified time in milliseconds.
static
AdvanceToMs(TestScheduler, double) void
AdvanceToMs moves the TestScheduler to the specified time in milliseconds.
static
FromTimeSpan(TestScheduler, TimeSpan) long
Converts a timespan to a virtual time for testing.
static
OnCompletedAt<T>(TestScheduler, double) Recorded<Notification<T>>
OnCompletedAt is a method to help create simulated input Observables in conjunction with CreateHotObservable or CreateColdObservable.
static
OnErrorAt<T>(TestScheduler, double, Exception) Recorded<Notification<T>>
OnErrorAt is a method to help create simulated input Observables in conjunction with CreateHotObservable or CreateColdObservable.
static
OnNextAt<T>(TestScheduler, double, T) Recorded<Notification<T>>
OnNextAt is a method to help create simulated input Observables in conjunction with CreateHotObservable or CreateColdObservable.
static
With(IMessageBus, Action) void
Override the default Message Bus during the specified block.
static
With<T, TRet>(T, Func<T, TRet>) TRet
With is an extension method that uses the given scheduler as the default Deferred and Taskpool schedulers for the given Func. Use this to initialize objects that store the default scheduler (most RxXaml objects).
static
With<T>(T, Action<T>) void
With is an extension method that uses the given scheduler as the default Deferred and Taskpool schedulers for the given Action.
static
With<TRet>(IMessageBus, Func<TRet>) TRet
Override the default Message Bus during the specified block.
static
WithAsync<T, TRet>(T, Func<T, Task<TRet>>) Task<TRet>
With is an extension method that uses the given scheduler as the default Deferred and Taskpool schedulers for the given Func. Use this to initialize objects that store the default scheduler (most RxXaml objects).
static
WithAsync<T>(T, Func<T, Task>) Task
With is an extension method that uses the given scheduler as the default Deferred and Taskpool schedulers for the given Action.
static
WithMessageBus(IMessageBus) IDisposable
WithMessageBus allows you to override the default Message Bus implementation until the object returned is disposed. If a message bus is not specified, a default empty one is created.
static
WithScheduler(IScheduler) IDisposable
WithScheduler overrides the default Deferred and Taskpool schedulers with the given scheduler until the return value is disposed. This is useful in a unit test runner to force RxXaml objects to schedule via a TestScheduler object.
static