public void Enumerate_0_ShouldReturnEmptyIEnumerable() { var sut = new CyclicArray <int>(new [] { 1, 2, 3 }); var result = sut.Enumerate(0).ToArray(); Assert.Multiple(() => { Assert.That(result.Length, Is.EqualTo(0)); }); }
public void Enumerate_ShouldWork() { var sut = new CyclicArray <int>(new [] { 1, 2, 3 }); var result = sut.Enumerate(2).ToArray(); Assert.Multiple(() => { Assert.That(result.Length, Is.EqualTo(6)); Assert.That(result[0], Is.EqualTo((0, 1))); Assert.That(result[1], Is.EqualTo((1, 2))); Assert.That(result[2], Is.EqualTo((2, 3))); Assert.That(result[3], Is.EqualTo((3, 1))); Assert.That(result[4], Is.EqualTo((4, 2))); Assert.That(result[5], Is.EqualTo((5, 3))); }); }