System.Linq.Tests.SumTests.SumOfNullableOfDecimal_SourceIsEmptyCollection_ZeroReturned C# (CSharp) Method

SumOfNullableOfDecimal_SourceIsEmptyCollection_ZeroReturned() private method

        public void SumOfNullableOfDecimal_SourceIsEmptyCollection_ZeroReturned()
        {
            IQueryable<decimal?> sourceNullableDecimal = Enumerable.Empty<decimal?>().AsQueryable();
            Assert.Equal(0m, sourceNullableDecimal.Sum());
            Assert.Equal(0m, sourceNullableDecimal.Sum(x => x));
        }
SumTests