public void ShouldNotSerializeNullProperty() { var item = new ItemWithNullProperty(); var xml = XmlSerializer <ItemWithNullProperty> .New().SerializeToString(item).Replace("\n", "").Replace("\r", "").Replace("\t", ""); Assert.True(xml.Equals("<?xml version=\"1.0\" encoding=\"utf-16\"?><ItemWithNullProperty />")); }
public void ShouldNotSerializeNullProperty() { var item = new ItemWithNullProperty(); var xml = XmlSerializer<ItemWithNullProperty>.New().SerializeToString(item).Replace("\n", "").Replace("\r", "").Replace("\t", ""); Assert.True(xml.Equals("<?xml version=\"1.0\" encoding=\"utf-16\"?><ItemWithNullProperty />")); }