Beispiel #1
0
        public void ClearTest()
        {
            RollingWindow <int> rollingWindow = new RollingWindow <int>(5);

            for (int i = 0; i < rollingWindow.WindowSize; i++)
            {
                rollingWindow.Add(i);
            }

            Assert.AreEqual(rollingWindow.WindowSize, rollingWindow.Count);
            rollingWindow.Clear();
            Assert.AreEqual(0, rollingWindow.Count);
        }
Beispiel #2
0
        public void ClearTest()
        {
            RollingWindow<int> rollingWindow = new RollingWindow<int>(5);

            for (int i = 0; i < rollingWindow.WindowSize; i++)
                rollingWindow.Add(i);

            Assert.AreEqual(rollingWindow.WindowSize, rollingWindow.Count);
            rollingWindow.Clear();
            Assert.AreEqual(0, rollingWindow.Count);
        }