public void DoesNotIterateForCount() { IEnumerableWithCount<int> throwingEnumerable = new ThrowingEnumerable(5); IOrderedEnumerableWithCount<int> orderBy = throwingEnumerable.OrderBy(x => x); IOrderedEnumerableWithCount<int> result = orderBy.ThenBy(x => x); Assert.AreEqual(5, result.Count); }
public void ExecutionIsDeferred() { IEnumerableWithCount<int> throwingEnumerable = new ThrowingEnumerable(0); IOrderedEnumerableWithCount<int> orderBy = throwingEnumerable.OrderBy(x => x); IOrderedEnumerableWithCount<int> result = orderBy.ThenBy(x => x); }
public void ExecutionIsDeferred() { IEnumerableWithCount<int> throwingEnumerable = new ThrowingEnumerable(0); throwingEnumerable.OrderBy(x => x); }
public void DoesNotIterateForCount() { IEnumerableWithCount<int> source = new ThrowingEnumerable(3); IEnumerableWithCount<int> result = source.OrderBy(x => x); Assert.AreEqual(3, result.Count); }