Exemple #1
0
        public void TestLockVersionException()
        {
            var item  = LockVersionTest.FindById(1);
            var item2 = LockVersionTest.FindById(1);

            item.Name = "jerry";
            item.Save();

            item2.Name = "mike";
            item2.Save();
        }
Exemple #2
0
        public void TestLockVersion()
        {
            var item = LockVersionTest.FindById(1);

            Assert.AreEqual(1, item.LockVersion);
            item.Name = "jerry";
            item.Save();

            var item0 = LockVersionTest.FindById(1);

            Assert.AreEqual(2, item0.LockVersion);
        }
Exemple #3
0
        public void TestLockVersionException()
        {
            Assert.Throws <DataException>(() => {
                var item  = LockVersionTest.FindById(1);
                var item2 = LockVersionTest.FindById(1);

                item.Name = "jerry";
                item.Save();

                item2.Name = "mike";
                item2.Save();
            });
        }