System.Linq.Tests.WhereTests.Where_PredicateIsNull_ArgumentNullExceptionThrown C# (CSharp) Method

Where_PredicateIsNull_ArgumentNullExceptionThrown() private method

private Where_PredicateIsNull_ArgumentNullExceptionThrown ( ) : void
return void
        public void Where_PredicateIsNull_ArgumentNullExceptionThrown()
        {
            IEnumerable<int> source = Enumerable.Range(1, 10);
            Func<int, bool> simplePredicate = null;
            Func<int, int, bool> complexPredicate = null;

            Assert.Throws<ArgumentNullException>("predicate", () => source.Where(simplePredicate));
            Assert.Throws<ArgumentNullException>("predicate", () => source.Where(complexPredicate));
        }
WhereTests