var scheduler = new TestScheduler(); var delay = TimeSpan.FromTicks(100); var observable = scheduler.CreateColdObservable( delay, ReactiveTest.OnNext(200, "value"), ReactiveTest.OnCompletedIn this example, the observable sequence emits a single value "value" after a delay of 100 ticks and completes 100 ticks later. The observer created using CreateObserver is then used to verify that the expected values and completion event are received at the correct times. The TestScheduler class is part of the System.Reactive.Testing package in the Reactive Extensions library.(300) ); var observer = scheduler.CreateObserver (); observable.Subscribe(observer); scheduler.Start(); observer.Messages.Should().HaveCount(2); observer.Messages[0].Value.Value.Should().Be("value"); observer.Messages[0].Time.Should().Be(TimeSpan.FromTicks(300)); observer.Messages[1].Value.Kind.Should().Be(NotificationKind.OnCompleted); observer.Messages[1].Time.Should().Be(TimeSpan.FromTicks(300));