public void CreateMetadataPropertyFromXmlAttribute_creates_annotation_with_string_if_no_serializer_available() { var property = new SomeElement().CreateMetadataPropertyFromXmlAttribute( XmlConstants.CustomAnnotationNamespace, "UseClrTypes", "true"); Assert.Equal(XmlConstants.UseClrTypesAnnotation, property.Name); Assert.Equal("true", property.Value); }
public void CreateMetadataPropertyFromXmlAttribute_creates_annotation_using_serializer_if_available() { var property = new SomeElement().CreateMetadataPropertyFromXmlAttribute( XmlConstants.CustomAnnotationNamespace, "ClrType", typeof(Random).AssemblyQualifiedName); Assert.Equal(XmlConstants.ClrTypeAnnotation, property.Name); Assert.Same(typeof(Random), property.Value); }