Ejemplo n.º 1
0
        public void MappedAttributesClassWithNull()
        {
            var dummyClass = new MappedAttributesClass(true, null, 2, 3);
            var xml        = dummyClass.ToXml();
            var expected   = @"<?xml version=""1.0"" encoding=""utf-16""?>
<MappedAttributesClass Value1=""true"" Value3=""2"" Value4=""3"" />";

            Assert.AreEqual(expected, xml);
        }
Ejemplo n.º 2
0
        public void MappedAttributesClass()
        {
            var instance  = new MappedAttributesClass(true, "1", 2, 3);
            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);
        }