public void XmlElement() { var obj = new TestClassWithXmlElementAttribute { Id = 123 }; CheckSerializationAndDeserializationByXml( @"<TestClassWithXmlElementAttribute type=""ExtendedXmlSerialization.Test.TestObject.TestClassWithXmlElementAttribute""> <Identifier>123</Identifier> </TestClassWithXmlElementAttribute>", obj); CheckCompatibilityWithDefaultSerializator(obj); }
public void XmlElementAttribute() { var expected = new TestClassWithXmlElementAttribute { Id = 123 }; var actual = new SerializationSupport().Assert( expected, @"<?xml version=""1.0"" encoding=""utf-8""?><TestClassWithXmlElementAttribute xmlns=""clr-namespace:ExtendedXmlSerializer.Tests.TestObject;assembly=ExtendedXmlSerializer.Tests""><Identifier>123</Identifier></TestClassWithXmlElementAttribute>" ); Assert.Equal(expected.Id, actual.Id); }