Пример #1
0
 public void TakeErrorTest()
 {
     var subject = new Subject<string>();
     var result = new List<IValueOrError<string>>();
     subject
         .TakeError()
         .Subscribe(result.Add);
     subject.OnNext("a");
     subject.OnError(new Exception("error!"));
     result.Count.Is(2);
     result[0].IsError.IsFalse();
     result[1].IsError.IsTrue();
 }