public void AppendsNavigationName_GivenReferenceType()
        {
            var spec = new StoreIncludeCompanyThenCountrySpec();

            string expected = $"{nameof(Store.Company)}.{nameof(Company.Country)}";
            string actual   = spec.IncludeAggregators.FirstOrDefault().IncludeString;

            actual.Should().Be(expected);
        }
예제 #2
0
        public void AppendIncludeExpressionInfoToListWithTypeThenInclude_GivenThenIncludeExpression()
        {
            var spec = new StoreIncludeCompanyThenCountrySpec();

            var includeExpressions = spec.IncludeExpressions.ToList();

            // The list must have two items, since ThenInclude can be applied once the first level is applied.
            includeExpressions.Should().HaveCount(2);

            includeExpressions[1].Type.Should().Be(IncludeTypeEnum.ThenInclude);
        }