public void CouldCompleteObserver(IMutableSeries <int, int> map) { var subscriber = new SumValuesObserver(); var series = map as Series <int, int>; var cursor = (series + series).GetCursor(); cursor.Source.Subscribe(subscriber); var expectedSum = 0; for (int i = 0; i < 10; i++) { map.Add(i, i); expectedSum += i; } Assert.IsFalse(subscriber.IsCompleted); map.Complete(); Thread.Sleep(100); Assert.IsTrue(subscriber.IsCompleted); Thread.Sleep(1000); Assert.AreEqual(expectedSum * 2, subscriber.Sum); }
public void Complete() { _innerSeries.Complete(); }
public void Complete() { MutableInner.Complete(); }