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

Where_SourceIsNull_ArgumentNullExceptionThrown() private method

private Where_SourceIsNull_ArgumentNullExceptionThrown ( ) : void
return void
        public void Where_SourceIsNull_ArgumentNullExceptionThrown()
        {
            IEnumerable<int> source = null;
            Func<int, bool> simplePredicate = (value) => true;
            Func<int, int, bool> complexPredicate = (value, index) => true;

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