public void TestStop() { ThrottledStream<int> stream = new ThrottledStream<int>(); stream.Stop(); Assert.IsFalse(stream.Running); Assert.IsNull(stream.IntervalTick); Assert.IsNull(stream.FlushTo); }
public void TestStopWhileRunning() { ThrottledStream<int> stream = new ThrottledStream<int>() { FlushTo = items => { } }; stream.Start(); stream.Stop(); Assert.IsFalse(stream.Running); Assert.IsNull(stream.IntervalTick); Assert.IsNull(stream.FlushTo); }