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); }
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); }