Exemplo n.º 1
0
            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> >());
            }
Exemplo n.º 2
0
 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();
     });
 }
Exemplo n.º 3
0
 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();
     });
 }
Exemplo n.º 4
0
 public void Should_handle_empty()
 {
     _scheduler.ExpectObservable(Observable.Empty <char>()).ToBe("|");
 }