Esempio n. 1
0
        public void XmlSerializeDeserialize_Empty_AreEqual()
        {
            var input = new InternetMediaTypeSerializeObject()
            {
                Id   = 17,
                Obj  = InternetMediaType.Empty,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new InternetMediaTypeSerializeObject()
            {
                Id   = 17,
                Obj  = InternetMediaType.Empty,
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.XmlSerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            Assert.AreEqual(exp.Obj, act.Obj, "Obj");
            DateTimeAssert.AreEqual(exp.Date, act.Date, "Date");;
        }
Esempio n. 2
0
 public void SerializeDeserialize_InternetMediaTypeSerializeObject_AreEqual()
 {
     var input = new InternetMediaTypeSerializeObject()
     {
         Id = 17,
         Obj = InternetMediaTypeTest.TestStruct,
         Date = new DateTime(1970, 02, 14),
     };
     var exp = new InternetMediaTypeSerializeObject()
     {
         Id = 17,
         Obj = InternetMediaTypeTest.TestStruct,
         Date = new DateTime(1970, 02, 14),
     };
     var act = SerializationTest.SerializeDeserialize(input);
     Assert.AreEqual(exp.Id, act.Id, "Id");
     Assert.AreEqual(exp.Obj, act.Obj, "Obj");
     DateTimeAssert.AreEqual(exp.Date, act.Date, "Date");;
 }