public void RemoveAtTest() { RollingWindow <int> rollingWindow = new RollingWindow <int>(5); for (int i = 0; i < rollingWindow.WindowSize; i++) { rollingWindow.Add(i); } rollingWindow.RemoveAt(3); rollingWindow.RemoveAt(1); Assert.AreEqual(3, rollingWindow.Count); Assert.AreEqual(0, rollingWindow[0]); Assert.AreEqual(2, rollingWindow[1]); Assert.AreEqual(4, rollingWindow[2]); }
public void RemoveAtTest() { RollingWindow<int> rollingWindow = new RollingWindow<int>(5); for (int i = 0; i < rollingWindow.WindowSize; i++) rollingWindow.Add(i); rollingWindow.RemoveAt(3); rollingWindow.RemoveAt(1); Assert.AreEqual(3, rollingWindow.Count); Assert.AreEqual(0, rollingWindow[0]); Assert.AreEqual(2, rollingWindow[1]); Assert.AreEqual(4, rollingWindow[2]); }