Esempio n. 1
0
        public void MappedWithExplicitXmlNames()
        {
            var instance  = new MappedWithExplicitXmlNames(1, 2, 3, 4);
            var roundtrip = instance.Roundtrip();

            Assert.AreEqual(instance.Value1, roundtrip.Value1);
            Assert.AreEqual(instance.Value2, roundtrip.Value2);
            Assert.AreEqual(instance.Value3, roundtrip.Value3);
            Assert.AreEqual(instance.Value4, roundtrip.Value4);
        }
Esempio n. 2
0
        public void MappedWithExplicitXmlNames()
        {
            var instance = new MappedWithExplicitXmlNames(1, 2, 3, 4);
            var xml      = instance.ToXml();
            var expected = @"<?xml version=""1.0"" encoding=""utf-16""?>
<MappedWithExplicitXmlNames Attribute1=""2"" Attribute2=""4"">
  <Element1>1</Element1>
  <Element3>3</Element3>
</MappedWithExplicitXmlNames>";

            Assert.AreEqual(expected, xml);
        }