Exemplo n.º 1
0
        public void Lab5_Roma_XDocumentTest_1()
        {
            var cd = fixture.Create <Cd>();

            XDocumentSerializer.Path = "Romaxml1.xml";
            XDocumentSerializer.CreateXMLfromObject <Cd>(cd);
            var getXml = XDocumentSerializer.GetXmlObject <Cd>();

            AssertFields(getXml, cd);
        }
Exemplo n.º 2
0
        public void Lab5_Roma_XDocumentTest_2()
        {
            var hdd = fixture.Create <Hdd>();

            XDocumentSerializer.Path = "Romaxml2.xml";
            XDocumentSerializer.CreateXMLfromObject <Hdd>(hdd);
            var res = XDocumentSerializer.GetXmlObject <Hdd>();

            Assert.AreEqual(hdd.Capacity, res.Capacity);
            Assert.AreEqual(hdd.Interface, res.Interface);
            Assert.AreEqual(hdd.RecordingSpeed, res.RecordingSpeed);
        }