Exemple #1
0
        public void Test1()
        {
            var o = new BaoXiuRS {
                UserName = "******"
            };

            o.Save();
            var p = PoModel.FindById(o.Id);

            Assert.AreEqual("tom", p.UserName);
            p.UserName = "******";
            p.Save();
            p = PoModel.FindById(o.Id);
            Assert.AreEqual("jerry", p.UserName);
        }
Exemple #2
0
        public void Test2()
        {
            var o = new BaoXiuRS {
                DT1 = new Date(2009, 5, 20), DT = new Date(2009, 5, 22)
            };

            o.Save();

            var o1 = BaoXiuRS.FindById(o.Id);

            Assert.AreEqual(new Date(2009, 5, 20), o1.DT1);
            Assert.AreEqual(new Date(2009, 5, 22), o1.DT);

            o1.DT = new Date(1998, 12, 22);
            o1.Save();

            var o2 = BaoXiuRS.FindById(o1.Id);

            Assert.AreEqual(new Date(2009, 5, 20), o2.DT1);
            Assert.AreEqual(new Date(1998, 12, 22), o2.DT);
        }