public void ConsecutiveIntsTest3() { var length = 10; var expected = Enumerable.Range(0, length).ToArray(); var actual = GetSequence.ConsecutiveInts(0, length); Assert.True(expected.SequenceEqual(actual)); Assert.Equal(length, expected.Length);// iterate over enumerable Assert.Equal(length, actual.Count); Assert.True(expected.SequenceEqual(actual)); }
public void ConsecutiveIntsTest1() { var length = 10; var expected = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; var actual = GetSequence.ConsecutiveInts(0, length); Assert.True(expected.SequenceEqual(actual)); Assert.Equal(length, expected.Length);// iterate over enumerable Assert.Equal(length, actual.Count); Assert.True(expected.SequenceEqual(actual)); }