public void CopyToTest() { RollingWindow <int> rollingWindow = new RollingWindow <int>(5); int[] array = new int[rollingWindow.WindowSize]; for (int i = 0; i < rollingWindow.WindowSize + 1; i++) { rollingWindow.Add(i); } rollingWindow.CopyTo(array, 0); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(i + 1, array[i]); } }
public void CopyToTest() { RollingWindow<int> rollingWindow = new RollingWindow<int>(5); int[] array = new int[rollingWindow.WindowSize]; for (int i = 0; i < rollingWindow.WindowSize + 1; i++) rollingWindow.Add(i); rollingWindow.CopyTo(array, 0); for (int i = 0; i < array.Length; i++) Assert.AreEqual(i + 1, array[i]); }