Пример #1
0
        public void CreateParentShouldThrowIfBindingStateWithoutImplicitParameter()
        {
            var    state        = new BindingState(this.configuration);
            Action createparent = () => EndPathBinder.CreateParentFromImplicitRangeVariable(state);

            createparent.ShouldThrow <ODataException>().WithMessage(Strings.MetadataBinder_PropertyAccessWithoutParentParameter);
        }
Пример #2
0
        public void CreateParentShouldProduceParentUsingParameters()
        {
            SingleValueNode parent = EndPathBinder.CreateParentFromImplicitRangeVariable(this.bindingState);
            EntityRangeVariableReferenceNode entityRangeVariableReferenceNode = (EntityRangeVariableReferenceNode)parent;

            entityRangeVariableReferenceNode.RangeVariable.Should().BeSameAs(this.bindingState.ImplicitRangeVariable);
        }
Пример #3
0
        public void CreateParentShouldProduceParentUsingParameters()
        {
            SingleValueNode parent = EndPathBinder.CreateParentFromImplicitRangeVariable(this.bindingState);
            ResourceRangeVariableReferenceNode entityRangeVariableReferenceNode = (ResourceRangeVariableReferenceNode)parent;

            Assert.Same(entityRangeVariableReferenceNode.RangeVariable, this.bindingState.ImplicitRangeVariable);
        }