public void EntityReferenceCanAppearAfterSingleton() { var path = PathFunctionalTestsUtil.RunParsePath("Boss/$ref"); ReferenceSegment referenceSegment = path.LastSegment as ReferenceSegment; Assert.Same(referenceSegment.TargetEdmNavigationSource, HardCodedTestModel.GetBossSingleton()); Assert.True(referenceSegment.SingleResult); }
public void ValidNavigationPropertyBeforeEntityReference() { var path = PathFunctionalTestsUtil.RunParsePath("People(7)/MyDog/$ref"); VerificationHelpers.VerifyPath(path, new Action <ODataPathSegment>[] { s => s.ShouldBeEntitySetSegment(HardCodedTestModel.GetPeopleSet()), s => s.ShouldBeSimpleKeySegment(7), s => s.ShouldBeNavigationPropertyLinkSegment(HardCodedTestModel.GetPersonMyDogNavProp()), }); }
public void KeyOnCollectionEntityReferencesShouldWork() { var path = PathFunctionalTestsUtil.RunParsePath("Dogs(7)/MyPeople(2)/$ref"); VerificationHelpers.VerifyPath(path, new Action <ODataPathSegment>[] { s => s.ShouldBeEntitySetSegment(HardCodedTestModel.GetDogsSet()), s => s.ShouldBeSimpleKeySegment(7), s => s.ShouldBeNavigationPropertyLinkSegment(HardCodedTestModel.GetDogMyPeopleNavProp()), s => s.ShouldBeSimpleKeySegment(2) }); }
public void EntityReferenceCanAppearAfterASingleValuedNavigationProperty() { var path = PathFunctionalTestsUtil.RunParsePath("Dogs(1)/FastestOwner/$ref"); path.LastSegment.ShouldBeNavigationPropertyLinkSegment(HardCodedTestModel.GetDogFastestOwnerNavProp()); }
public void EntityReferenceCanAppearAfterACollectionValuedNavigationProperty() { var path = PathFunctionalTestsUtil.RunParsePath("Dogs(1)/MyPeople/$ref"); path.LastSegment.ShouldBeNavigationPropertyLinkSegment(HardCodedTestModel.GetDogMyPeopleNavProp()); }
public void EntityReferenceCanAppearAfterAnEntitySet() { var path = PathFunctionalTestsUtil.RunParsePath("People/$ref"); path.LastSegment.ShouldBeReferenceSegment(HardCodedTestModel.GetPeopleSet()); }
public void EntityReferenceCanAppearAfterBoundFunctionReturningSingleEntity() { var path = PathFunctionalTestsUtil.RunParsePath("People/Fully.Qualified.Namespace.GetPersonWhoHasSmartestDog/$ref"); path.LastSegment.ShouldBeReferenceSegment(HardCodedTestModel.GetPeopleSet()); }
public void EntityReferenceCanAppearAfterCastedType() { var path = PathFunctionalTestsUtil.RunParsePath("People/Fully.Qualified.Namespace.Employee/$ref"); path.LastSegment.ShouldBeReferenceSegment(HardCodedTestModel.GetPeopleSet()); }
public void EntityReferenceCanAppearAfterAComplexProperty() { var path = PathFunctionalTestsUtil.RunParsePath("People(1)/MyAddress/$ref"); path.LastSegment.ShouldBeReferenceSegment(HardCodedTestModel.GetPeopleSet()); }