public void ValidationShouldFailIfADerivedPropertyIsUsedWithoutATypeCast() { this.ValidateBindingWithExpectedErrors( @"<NavigationPropertyBinding Path=""DerivedNavigation"" Target=""EntitySet"" />", EdmErrorCode.BadUnresolvedNavigationPropertyPath, ErrorStrings.Bad_UnresolvedNavigationPropertyPath("DerivedNavigation", "Test.EntityType")); }
public void ValidationShouldFailIfATypeCastIsFollowedByANonExistentProperty() { this.ValidateBindingWithExpectedErrors( @"<NavigationPropertyBinding Path=""Test.DerivedEntityType/NonExistent"" Target=""EntitySet"" />", EdmErrorCode.BadUnresolvedNavigationPropertyPath, ErrorStrings.Bad_UnresolvedNavigationPropertyPath("Test.DerivedEntityType/NonExistent", "Test.EntityType")); }
public void ValidationShouldFailIfNavigationParterIsSpecifiedButCannotBeFound() { this.ValidateNavigationWithExpectedErrors(@"<NavigationProperty Name=""Navigation"" Type=""Test.EntityType"" Partner=""Nonexistent"" />", new[] { EdmErrorCode.BadUnresolvedNavigationPropertyPath, EdmErrorCode.UnresolvedNavigationPropertyPartnerPath }, new[] { ErrorStrings.Bad_UnresolvedNavigationPropertyPath("Nonexistent", "Test.EntityType"), string.Format("Cannot resolve partner path for navigation property '{0}'.", "Navigation") }); }
public void ValidationShouldFailIfNavigationParterIsSpecifiedButCannotBeFound() { this.ValidateNavigationWithExpectedErrors(@"<NavigationProperty Name=""Navigation"" Type=""Test.EntityType"" Partner=""Nonexistent"" />", EdmErrorCode.BadUnresolvedNavigationPropertyPath, ErrorStrings.Bad_UnresolvedNavigationPropertyPath("Nonexistent", "Test.EntityType")); }