public void CanEnumerateNested() { const string input = "asdf"; var sut = new StringInput(input); int visitedItems = 0; foreach (var outerItem in sut.GetEnumerable(0)) { var innerItem = sut.GetEnumerable(visitedItems, 1).ToList().Single(); Assert.AreEqual(outerItem, innerItem); visitedItems += 1; } Assert.AreEqual(input.Length, visitedItems); }
public void CanEnumerateString() { var sut = new StringInput("asdf"); CollectionAssert.AreEqual("asdf".ToCharArray(), sut.GetEnumerable(0)); }