Пример #1
0
        public void TryGetRelativeEntitySetWithJustBindingParameterShouldReturnTrueAndHaveNoErrors()
        {
            EdmFunction function = new EdmFunction("ns", "GetStuff", DefaultValidEntityTypeRef, true /*isBound*/, new EdmPathExpression("param"), false);

            function.AddParameter("param", DefaultValidEntityTypeRef);
            EdmModel model = new EdmModel();

            model.AddElement(function);

            IEnumerable <EdmError> errorsFound        = null;
            IEdmOperationParameter operationParameter = null;
            IEnumerable <IEdmNavigationProperty> navigationProperties = null;
            IEdmEntityType entityType = null;

            function.TryGetRelativeEntitySetPath(model, out operationParameter, out navigationProperties, out entityType, out errorsFound).Should().BeTrue();
            errorsFound.Should().HaveCount(0);
            operationParameter.Should().NotBeNull();
            navigationProperties.Should().HaveCount(0);
            entityType.Should().Be(DefaultValidEntityTypeRef.Definition);
        }