Esempio n. 1
0
        public void XmlSerializeDeserialize_Empty_AreEqual()
        {
            var input = new QGuidSerializeObject
            {
                Id   = 17,
                Obj  = Uuid.Empty,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new QGuidSerializeObject
            {
                Id   = 17,
                Obj  = Uuid.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");
            Assert.AreEqual(exp.Date, act.Date, "Date");
        }
Esempio n. 2
0
        public void DataContractSerializeDeserialize_GuidSerializeObject_AreEqual()
        {
            var input = new QGuidSerializeObject
            {
                Id   = 17,
                Obj  = TestStruct,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new QGuidSerializeObject
            {
                Id   = 17,
                Obj  = TestStruct,
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.DataContractSerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            Assert.AreEqual(exp.Obj, act.Obj, "Obj");
            Assert.AreEqual(exp.Date, act.Date, "Date");
        }
Esempio n. 3
0
 public void XmlSerializeDeserialize_QGuidSerializeObject_AreEqual()
 {
     var input = new QGuidSerializeObject()
     {
         Id = 17,
         Obj = UuidTest.TestStruct,
         Date = new DateTime(1970, 02, 14),
     };
     var exp = new QGuidSerializeObject()
     {
         Id = 17,
         Obj = UuidTest.TestStruct,
         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");;
 }