public void List_iterated_and_ToArray___OK() { var sut = new DeadBandCompression(0.1); var data = RawDataForTrend().ToList(); var expected = ExpectedForTrend().ToList(); DataPointIterator dataPointIterator = sut.Process(data); DataPointIterator enumerator = dataPointIterator.GetEnumerator(); enumerator.MoveNext(); enumerator.MoveNext(); var actual = dataPointIterator.ToArray(); CollectionAssert.AreEqual(expected, actual); }
public void List_iterated_and_ToArray___OK(double compressionDeviation, IEnumerable <DataPoint> rawData, IEnumerable <DataPoint> expectedData) { var sut = new SwingingDoorCompression(compressionDeviation); var data = rawData.ToList(); var expected = expectedData.ToList(); DataPointIterator dataPointIterator = sut.Process(data); DataPointIterator enumerator = dataPointIterator.GetEnumerator(); enumerator.MoveNext(); enumerator.MoveNext(); var actual = dataPointIterator.ToArray(); Print(expected, "expected"); Print(actual, "actual"); CollectionAssert.AreEqual(expected, actual); }