public void Dispose() { var cs = new MaybeSubject <int>(); cs.ObserveOn(NewThreadScheduler.Default) .Test(true) .AssertEmpty(); Assert.False(cs.HasObserver()); }
public void Race_Complete_Dispose() { for (int i = 0; i < TestHelper.RACE_LOOPS; i++) { var cs = new MaybeSubject <int>(); var to = cs.ObserveOn(NewThreadScheduler.Default) .Test(); TestHelper.Race(() => { cs.OnCompleted(); }, () => { to.Dispose(); }); } }