Ejemplo n.º 1
0
        public void TestFileObjectSerialization()
        {
            FileObject file = new FileObject();

            file.LocalPath = Directory.GetFiles(".").First();
            file.LoadFromDisk();

            file.Path = "/" + file.Name;

            var xml = file.Serialize();

            var strResult = xml.ToString();

            var roundtrip = new FileObject();

            Assert.IsTrue(roundtrip.Validate(xml));
            roundtrip.Deserialize(xml);

            assertAreEqual(file, roundtrip);
        }