Beispiel #1
-1
        public void TestStop() {
            ThrottledStream<int> stream = new ThrottledStream<int>();

            stream.Stop();

            Assert.IsFalse(stream.Running);
            Assert.IsNull(stream.IntervalTick);
            Assert.IsNull(stream.FlushTo);
        }
Beispiel #2
-1
        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);
        }