示例#1
0
		public virtual void Test()
		{
			IExtObjectContainer oc = this.Db();
			ObjectVersionTest.Item @object = new ObjectVersionTest.Item("c1");
			oc.Store(@object);
			IObjectInfo objectInfo1 = oc.GetObjectInfo(@object);
			long oldVer = objectInfo1.GetCommitTimestamp();
			//Update
			@object.SetName("c3");
			oc.Store(@object);
			IObjectInfo objectInfo2 = oc.GetObjectInfo(@object);
			long newVer = objectInfo2.GetCommitTimestamp();
			Assert.IsNotNull(objectInfo1.GetUUID());
			Assert.IsNotNull(objectInfo2.GetUUID());
			Assert.IsTrue(oldVer > 0);
			Assert.IsTrue(newVer > 0);
			Assert.AreEqual(objectInfo1.GetUUID(), objectInfo2.GetUUID());
			Assert.IsTrue(newVer > oldVer);
		}
        public virtual void Test()
        {
            IExtObjectContainer oc = this.Db();

            ObjectVersionTest.Item @object = new ObjectVersionTest.Item("c1");
            oc.Store(@object);
            IObjectInfo objectInfo1 = oc.GetObjectInfo(@object);
            long        oldVer      = objectInfo1.GetCommitTimestamp();

            //Update
            @object.SetName("c3");
            oc.Store(@object);
            IObjectInfo objectInfo2 = oc.GetObjectInfo(@object);
            long        newVer      = objectInfo2.GetCommitTimestamp();

            Assert.IsNotNull(objectInfo1.GetUUID());
            Assert.IsNotNull(objectInfo2.GetUUID());
            Assert.IsTrue(oldVer > 0);
            Assert.IsTrue(newVer > 0);
            Assert.AreEqual(objectInfo1.GetUUID(), objectInfo2.GetUUID());
            Assert.IsTrue(newVer > oldVer);
        }