示例#1
0
 public void ValidationShouldFailIfADerivedPropertyIsUsedWithoutATypeCast()
 {
     this.ValidateBindingWithExpectedErrors(
         @"<NavigationPropertyBinding Path=""DerivedNavigation"" Target=""EntitySet"" />",
         EdmErrorCode.BadUnresolvedNavigationPropertyPath,
         ErrorStrings.Bad_UnresolvedNavigationPropertyPath("DerivedNavigation", "Test.EntityType"));
 }
示例#2
0
 public void ValidationShouldFailIfATypeCastIsFollowedByANonExistentProperty()
 {
     this.ValidateBindingWithExpectedErrors(
         @"<NavigationPropertyBinding Path=""Test.DerivedEntityType/NonExistent"" Target=""EntitySet"" />",
         EdmErrorCode.BadUnresolvedNavigationPropertyPath,
         ErrorStrings.Bad_UnresolvedNavigationPropertyPath("Test.DerivedEntityType/NonExistent", "Test.EntityType"));
 }
示例#3
0
 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")
     });
 }
示例#4
0
 public void ValidationShouldFailIfNavigationParterIsSpecifiedButCannotBeFound()
 {
     this.ValidateNavigationWithExpectedErrors(@"<NavigationProperty Name=""Navigation"" Type=""Test.EntityType"" Partner=""Nonexistent"" />",
                                               EdmErrorCode.BadUnresolvedNavigationPropertyPath,
                                               ErrorStrings.Bad_UnresolvedNavigationPropertyPath("Nonexistent", "Test.EntityType"));
 }