public void Should_return_an_IExpectObservable() { var expectable = _scheduler.ExpectObservable(Observable.Return(1)); Assert.That(expectable, Is.Not.Null); Assert.That(expectable, Is.AssignableTo <IExpectObservable <int> >()); }
public void Should_fail_when_event_timing_differs() { Assert.Throws <Exception>(() => { var scheduler = new MarbleTestScheduler(); scheduler.ExpectObservable(Observable.Return("hello")).ToBe("--h", new { h = "hello" }); scheduler.Flush(); }); }
public void Should_fail_when_observables_end_with_different_error_types() { Assert.Throws <Exception>(() => { var scheduler = new MarbleTestScheduler(); var source = scheduler.CreateColdObservable <Unit>("---#", null, new ArgumentException()); scheduler.ExpectObservable(source).ToBe("---#", null, new Exception()); scheduler.Flush(); }); }
public void Should_handle_empty() { _scheduler.ExpectObservable(Observable.Empty <char>()).ToBe("|"); }