public void ValidationShouldFailIfEnumMemberIsSpecifiedButCannotBeFoundTheMember() { IEdmModel model = GetEdmModel(@"<EnumMember>TestNS2.Color/UnknownMember</EnumMember>"); IEnumerable <EdmError> errors; model.Validate(out errors).Should().BeFalse(); errors.Should().HaveCount(2); errors.Should().Contain(e => e.ErrorCode == EdmErrorCode.InvalidEnumMemberPath && e.ErrorMessage == ErrorStrings.CsdlParser_InvalidEnumMemberPath("TestNS2.Color/UnknownMember")); }
public void ValidationShouldFailIfEnumMemberIsSpecifiedButCannotBeFoundTheMember() { IEdmModel model = GetEnumAnnotationModel(@"<EnumMember>TestNS2.Color/UnknownMember</EnumMember>"); IEnumerable <EdmError> errors; Assert.False(model.Validate(out errors)); Assert.Equal(2, errors.Count()); Assert.Contains(errors, e => e.ErrorCode == EdmErrorCode.InvalidEnumMemberPath && e.ErrorMessage == ErrorStrings.CsdlParser_InvalidEnumMemberPath("TestNS2.Color/UnknownMember")); }