public void WhenPreviousIsNull_ReturnsFirstItem() { //Arrange var expected = "Joe"; var list = new[] { expected, "Michael", "Jane" }; //Act var result = list.NextElement(null); //Assert Assert.AreEqual(expected, result); }
public void WhenPreviousIsLastItem_ReturnsFirstItem() { //Arrange var previous = "Bob"; var expected = "Joe"; var list = new[] { expected, "Michael", previous }; //Act var result = list.NextElement(previous); //Assert Assert.AreEqual(expected, result); }
public void WhenEnumerableHasItems_ReturnsNextItem() { //Arrange var previous = "Bob"; var expected = "Joe"; var list = new[] { "Michael", previous, expected }; //Act var result = list.NextElement(previous); //Assert Assert.AreEqual(expected, result); }