예제 #1
0
        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 />"));
        }
예제 #2
0
 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 />"));
 }