public void ListWithoutPredicateDoesntIterate() { var source = new NonEnumerableList<int>(1, 5, 10, 3); Assert.AreEqual(3, source.Last()); }
public void ListWithPredicateStillIterates() { var source = new NonEnumerableList <int>(1, 5, 10, 3); Assert.Throws <NotSupportedException>(() => source.Last(x => x > 3)); }
public void ListWithPredicateStillIterates() { var source = new NonEnumerableList<int>(1, 5, 10, 3); Assert.Throws<NotSupportedException>(() => source.Last(x => x > 3)); }
public void ListWithoutPredicateDoesntIterate() { var source = new NonEnumerableList <int>(1, 5, 10, 3); Assert.AreEqual(3, source.Last()); }