public void Crash_OnSubscribe() { var cs = new CompletableSubject(); cs.SubscribeSafe(new FailingCompletableObserver(true, true, true)); Assert.False(cs.HasObserver()); }
public void Crash_OnError() { var cs = new CompletableSubject(); cs.SubscribeSafe(new FailingCompletableObserver(false, true, true)); Assert.True(cs.HasObserver()); cs.OnError(new InvalidOperationException("main")); }
public void Normal_Dispose() { var cs = new CompletableSubject(); var to = new TestObserver <object>(); cs.SubscribeSafe(to); Assert.True(cs.HasObserver()); to.Dispose(); Assert.False(cs.HasObserver()); }