Beispiel #1
0
        public void Lab5_GreyWarden_Serialize_Doc_2()
        {
            var xmlDocSerializer = new XmlDocumentSerializer();
            var hdd       = fixture.Create <Hdd>();
            var xmlDoc    = xmlDocSerializer.Serialize(hdd);
            var resultHdd = xmlDocSerializer.Deserialize <Hdd>(xmlDoc);

            Assert.AreEqual(hdd.Capacity, resultHdd.Capacity);
            Assert.AreEqual(hdd.Interface, resultHdd.Interface);
            Assert.AreEqual(hdd.RecordingSpeed, resultHdd.RecordingSpeed);
        }
Beispiel #2
0
        public void Lab5_GreyWarden_Serialize_Doc_3()
        {
            var xmlDocSerializer = new XmlDocumentSerializer();
            var list             = new List <Hdd> {
                fixture.Create <Hdd>()
            };
            var xmlDoc     = xmlDocSerializer.Serialize(list);
            var resultList = xmlDocSerializer.Deserialize <List <Hdd> >(xmlDoc);

            Assert.AreEqual(list[0].Capacity, resultList[0].Capacity);
            Assert.AreEqual(list[0].Interface, resultList[0].Interface);
            Assert.AreEqual(list[0].RecordingSpeed, resultList[0].RecordingSpeed);
        }