public void ContainsTest() { RollingWindow <int> rollingWindow = new RollingWindow <int>(5); for (int i = 0; i < rollingWindow.WindowSize; i++) { rollingWindow.Add(i); } for (int i = -5; i < 10; i++) { Assert.AreEqual((i >= 0) && (i < 5), rollingWindow.Contains(i)); } }
public void ContainsTest() { RollingWindow<int> rollingWindow = new RollingWindow<int>(5); for (int i = 0; i < rollingWindow.WindowSize; i++) rollingWindow.Add(i); for (int i = -5; i < 10; i++) Assert.AreEqual((i >= 0) && (i < 5), rollingWindow.Contains(i)); }