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