/// <exception cref="System.Exception"></exception>
		public virtual void Test()
		{
			SimpleTimeStampIdTestCase.STSItem item = (SimpleTimeStampIdTestCase.STSItem)Db().
				QueryByExample(typeof(SimpleTimeStampIdTestCase.STSItem)).Next();
			long version = Db().GetObjectInfo(item).GetCommitTimestamp();
			Assert.IsGreater(0, version);
			Assert.IsGreaterOrEqual(version, CurrentVersion());
			Reopen();
			SimpleTimeStampIdTestCase.STSItem item2 = new SimpleTimeStampIdTestCase.STSItem("two"
				);
			Db().Store(item2);
			Db().Commit();
			long secondVersion = Db().GetObjectInfo(item2).GetCommitTimestamp();
			Assert.IsGreater(version, secondVersion);
			Assert.IsGreaterOrEqual(secondVersion, CurrentVersion());
		}
Example #2
0
        /// <exception cref="System.Exception"></exception>
        public virtual void Test()
        {
            SimpleTimeStampIdTestCase.STSItem item = (SimpleTimeStampIdTestCase.STSItem)Db().
                                                     QueryByExample(typeof(SimpleTimeStampIdTestCase.STSItem)).Next();
            long version = Db().GetObjectInfo(item).GetCommitTimestamp();

            Assert.IsGreater(0, version);
            Assert.IsGreaterOrEqual(version, CurrentVersion());
            Reopen();
            SimpleTimeStampIdTestCase.STSItem item2 = new SimpleTimeStampIdTestCase.STSItem("two"
                                                                                            );
            Db().Store(item2);
            Db().Commit();
            long secondVersion = Db().GetObjectInfo(item2).GetCommitTimestamp();

            Assert.IsGreater(version, secondVersion);
            Assert.IsGreaterOrEqual(secondVersion, CurrentVersion());
        }