public void ValidationShouldFailIfEnumMemberIsSpecifiedButCannotBeFound() { IEdmModel model = GetEnumAnnotationModel(@"<EnumMember>TestNS2.UnknownColor/Blue</EnumMember>"); IEnumerable <EdmError> errors; Assert.False(model.Validate(out errors)); var error = Assert.Single(errors); Assert.Equal(EdmErrorCode.BadUnresolvedEnumMember, error.ErrorCode); Assert.Equal(ErrorStrings.Bad_UnresolvedEnumMember("Blue"), error.ErrorMessage); }
public void ValidationShouldFailIfEnumMemberIsSpecifiedButCannotBeFound() { IEdmModel model = GetEdmModel(@"<EnumMember>TestNS2.UnknownColor/Blue</EnumMember>"); IEnumerable <EdmError> errors; model.Validate(out errors).Should().BeFalse(); errors.Should().HaveCount(1); errors.Should().Contain(e => e.ErrorCode == EdmErrorCode.BadUnresolvedEnumMember && e.ErrorMessage == ErrorStrings.Bad_UnresolvedEnumMember("Blue")); }