public void OvershootIndexOnList() { IEnumerable <int> source = new NonEnumerableList <int> { 90, 91, 92 }; Assert.AreEqual(0, source.ElementAtOrDefault(3)); }
public void OvershootIndexOnList() { IEnumerable <int> source = new NonEnumerableList <int> { 90, 91, 92 }; Assert.Throws <ArgumentOutOfRangeException>(() => source.ElementAt(3)); }
public void ValidIndexOnList() { IEnumerable <int> source = new NonEnumerableList <int>(100, 56, 93, 22); Assert.AreEqual(93, source.ElementAt(2)); }
public void ListWithPredicateStillIterates() { var source = new NonEnumerableList <int>(1, 5, 10, 3); Assert.Throws <NotSupportedException>(() => source.LastOrDefault(x => x > 3)); }
public void ListWithoutPredicateDoesntIterate() { var source = new NonEnumerableList <int>(1, 5, 10, 3); Assert.AreEqual(3, source.LastOrDefault()); }
public void ListWithoutPredicateDoesntIterate() { var source = new NonEnumerableList<int>(1, 5, 10, 3); Assert.AreEqual(3, source.Last()); }
public void ValidIndexOnList() { IEnumerable<int> source = new NonEnumerableList<int>(100, 56, 93, 22); Assert.AreEqual(93, source.ElementAt(2)); }
public void OvershootIndexOnList() { IEnumerable<int> source = new NonEnumerableList<int> { 90, 91, 92 }; Assert.Throws<ArgumentOutOfRangeException>(() => source.ElementAt(3)); }
public void ListWithPredicateStillIterates() { var source = new NonEnumerableList<int>(1, 5, 10, 3); Assert.Throws<NotSupportedException>(() => source.Last(x => x > 3)); }
public void OvershootIndexOnList() { IEnumerable<int> source = new NonEnumerableList<int> { 90, 91, 92 }; Assert.AreEqual(0, source.ElementAtOrDefault(3)); }
public void ListWithPredicateStillIterates() { var source = new NonEnumerableList <int>(new[] { 1, 2, 3 }); Assert.Throws <NotSupportedException>(() => source.Last(x => x > 2)); }
public void ListWithoutPredicateDoesntIterate() { var source = new NonEnumerableList <int>(new[] { 1, 2, 3 }); Assert.AreEqual(3, source.Last()); }