示例#1
0
        public void GetNavigationNodeCreatesCollectionNavigationNodeForManyMultiplicityProperty()
        {
            IEdmNavigationProperty property = HardCodedTestModel.GetDogMyPeopleNavProp();
            SingleEntityNode       parent   = new SingleEntityCastNode(null, HardCodedTestModel.GetDogType());
            BindingState           state    = new BindingState(configuration);
            KeyBinder keyBinder             = new KeyBinder(FakeBindMethods.BindMethodReturningASingleDog);

            var result = InnerPathTokenBinder.GetNavigationNode(property, parent, null, state, keyBinder);

            result.ShouldBeCollectionNavigationNode(property);
        }
示例#2
0
        public void GetNavigationNodeCreatesSingleNavigationNodeForSingleMultiplicityProperty()
        {
            IEdmNavigationProperty property = HardCodedTestModel.GetPersonMyDogNavProp();
            IEdmNavigationSource   navigationSource;
            SingleResourceNode     parent = new SingleResourceCastNode(null, HardCodedTestModel.GetDogType());
            BindingState           state  = new BindingState(Configuration);
            KeyBinder keyBinder           = new KeyBinder(FakeBindMethods.BindMethodReturningASingleDog);

            var result = InnerPathTokenBinder.GetNavigationNode(property, parent, null, state, keyBinder, out navigationSource);

            result.ShouldBeSingleNavigationNode(property);
        }