public void ThrowsWhenPredicateIsNull() { var source = new[] { 1, 2, 3 }; Assert.Throws <ArgumentNullException>(() => MyEnumerable.Any(source, null)); }
public void TrueWhenNotEmpty() { var numbers = new[] { 1, 2, 3 }; Assert.That(MyEnumerable.Any(numbers, n => n > 1), Is.True); }
public void ThrowsWhenSourceIsNull() { IEnumerable <Int32> source = null; Assert.Throws <ArgumentNullException>(() => MyEnumerable.Any(source, n => n > 1)); }
public void FalseWhenEmpty() { var numbers = new List <Int32>(); Assert.That(MyEnumerable.Any(numbers, n => n > 0), Is.False); }