public void RoundTripStringXmlSerialization()
        {
            var animal = new Animal { Id = 1, Name = "Fido", Tricks = "Bark" };

            var xml = animal.XmlSerialize();

            var candidate = xml.XmlDeserializer<Animal>();

            this.Check(animal, candidate);
        }
        public void RoundTripFileXmlSerialization()
        {
            var animal = new Animal { Id = 1, Name = "Fido", Tricks = "Bark" };

            var fileName = ".\\fido.xml";
            animal.XmlSerialize(fileName);

            var candidate = fileName.LoadXmlDocument<Animal>();

            this.Check(animal, candidate);
        }
        public void RoundTripStringXmlSerialization()
        {
            var animal = new Animal {
                Id = 1, Name = "Fido", Tricks = "Bark"
            };

            var xml = animal.XmlSerialize();

            var candidate = xml.XmlDeserializer <Animal>();

            this.Check(animal, candidate);
        }
        public void RoundTripFileXmlSerialization()
        {
            var animal = new Animal {
                Id = 1, Name = "Fido", Tricks = "Bark"
            };

            var fileName = ".\\fido.xml";

            animal.XmlSerialize(fileName);

            var candidate = fileName.LoadXmlDocument <Animal>();

            this.Check(animal, candidate);
        }