public void CanSerialize()
        {
            // Arrange
            var addr = new Address()
            {
                Number = 1,
                Street = "Str"
            };
            var sut = CreateSUT();

            // Act
            var value = sut.Serialize(addr);

            // Assert
            Assert.AreEqual("{Street:Str,Number:1}", value);
        }
        public void CanSerialize()
        {
            // Arrange
            var addr = new Address()
            {
                Number = 1,
                Street = "Str"
            };
            var sut = CreateSUT();

            // Act
            var value = sut.Serialize(addr);

            // Assert
            Assert.AreEqual("{\"<Number>k__BackingField\":1,\"<Street>k__BackingField\":\"Str\"}", value);
        }
        public void CanSerialize()
        {
            // Arrange
            var addr = new Address()
            {
                Number = 1,
                Street = "Str"
            };
            var sut = CreateSUT();

            // Act
            var value = sut.Serialize(addr);

            // Assert
            Assert.AreEqual("AAEAAAD/////AQAAAAAAAAAMAgAAAEpTZXJpYWxpemF0aW9uLlRlc3RzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAUBAAAAJ1NlcmlhbGl6YXRpb24uVGVzdHMuT2JqZWN0VGVzdHMuQWRkcmVzcwIAAAAXPFN0cmVldD5rX19CYWNraW5nRmllbGQXPE51bWJlcj5rX19CYWNraW5nRmllbGQBAAgCAAAABgMAAAADU3RyAQAAAAs=", value);
        }
        public void CanPerformDeepCopy()
        {
            // Arrange
            var addr = new Address()
            {
                Number = 1,
                Street = "Str"
            };
            SerializationContext.Current.Initialize(SerializationType.Xml);

            // Act
            var newAddr = addr.DeepCopy();

            // Assert
            Assert.AreNotSame(addr, newAddr);
            Assert.AreEqual(addr.Number, newAddr.Number);
            Assert.AreEqual(addr.Street, newAddr.Street);
        }
        public void CanSerialize()
        {
            // Arrange
            var addr = new Address()
            {
                Number = 1,
                Street = "Str"
            };
            var sut = CreateSUT();

            // Act
            var value = sut.Serialize(addr);

            // Assert
            Assert.AreEqual(@"<?xml version=""1.0"" encoding=""utf-16""?>
            <Address xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
              <Street>Str</Street>
              <Number>1</Number>
            </Address>", value);
        }