public void TestLockVersionException() { var item = LockVersionTest.FindById(1); var item2 = LockVersionTest.FindById(1); item.Name = "jerry"; item.Save(); item2.Name = "mike"; item2.Save(); }
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); }
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(); }); }