示例#1
0
        public void DateTimeTest()
        {
            using (SoodaTransaction tran = new SoodaTransaction())
            {
                PKDateTime test2 = PKDateTime.Load(new DateTime(2000, 1, 1, 1, 0, 0));

                Assert.AreEqual(test2.Parent.Id, new DateTime(2000, 1, 1, 0, 0, 0));
                Assert.AreEqual((string)test2.Parent.Data, "test data");
                Assert.AreEqual((string)test2.Data, "test data 2");
            }
        }
示例#2
0
        public void DateTimeTest()
        {
            string ser;

            using (SoodaTransaction tran = new SoodaTransaction())
            {
                PKDateTime test  = new PKDateTime();
                PKDateTime test2 = PKDateTime.Load(new DateTime(2000, 1, 1, 0, 0, 0, 0));

                Assert.AreEqual((string)test2.Data, "test data");

                ser = tran.Serialize();
                tran.Deserialize(ser);
                Assert.AreEqual(ser, tran.Serialize());
            }
        }