Пример #1
0
        public void AddsNothingToList_GivenThenIncludeExpressionWithFalseCondition()
        {
            var spec = new CompanyByIdWithFalseConditionsForInnerChains(1);

            spec.IncludeExpressions.Should().HaveCount(1);
            spec.IncludeExpressions.First().Type.Should().Be(IncludeTypeEnum.Include);
            spec.IncludeExpressions.Where(x => x.Type == IncludeTypeEnum.ThenInclude).Should().BeEmpty();
        }
Пример #2
0
        public void AddsNothingToList_GivenThenByDescendingExpressionWithFalseCondition()
        {
            var spec = new CompanyByIdWithFalseConditionsForInnerChains(1);

            spec.OrderExpressions.Should().HaveCount(2);
            spec.OrderExpressions.First().OrderType.Should().Be(OrderTypeEnum.OrderBy);
            spec.OrderExpressions.Skip(1).First().OrderType.Should().Be(OrderTypeEnum.OrderByDescending);
            spec.OrderExpressions.Where(x => x.OrderType == OrderTypeEnum.ThenByDescending).Should().BeEmpty();
        }