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