System.Linq.Tests.SingleOrDefaultTests.ThrowsOnNullSource C# (CSharp) Method

ThrowsOnNullSource() private method

private ThrowsOnNullSource ( ) : void
return void
        public void ThrowsOnNullSource()
        {
            IQueryable<int> source = null;
            Assert.Throws<ArgumentNullException>("source", () => source.SingleOrDefault());
            Assert.Throws<ArgumentNullException>("source", () => source.SingleOrDefault(i => i % 2 == 0));
        }