diff options
author | Martin Taal | 2012-12-12 11:43:18 +0000 |
---|---|---|
committer | Martin Taal | 2012-12-12 11:43:18 +0000 |
commit | 9be9a4454325ff56c99109a4a255b373d5bc9a99 (patch) | |
tree | 2e339f437db021f7f48752357ccb7ddbf384ecd1 | |
parent | 36ba7a77d238f78603f8ef8b65e14ae190fe369e (diff) | |
download | cdo-9be9a4454325ff56c99109a4a255b373d5bc9a99.tar.gz cdo-9be9a4454325ff56c99109a4a255b373d5bc9a99.tar.xz cdo-9be9a4454325ff56c99109a4a255b373d5bc9a99.zip |
Hibernate auditing: added check on incrementing version number
-rw-r--r-- | plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java index c1a702897c..3840bf18bf 100644 --- a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java +++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java @@ -110,18 +110,22 @@ public class CDOObjectHistoryTest extends AbstractCDOTest long commitTime1 = transaction.commit().getTimeStamp(); assertEquals(true, session.getRepositoryInfo().getCreationTime() < commitTime1); assertEquals("ESC", company.getName()); + final CDOObject cdoObjectCompany = CDOUtil.getCDOObject(company); + assertEquals(1, cdoObjectCompany.cdoRevision().getVersion()); company.setName("Sympedia"); long commitTime2 = transaction.commit().getTimeStamp(); assertEquals(true, commitTime1 < commitTime2); assertEquals(true, session.getRepositoryInfo().getCreationTime() < commitTime2); assertEquals("Sympedia", company.getName()); + assertEquals(2, cdoObjectCompany.cdoRevision().getVersion()); company.setName("Eclipse"); long commitTime3 = transaction.commit().getTimeStamp(); assertEquals(true, commitTime2 < commitTime3); assertEquals(true, session.getRepositoryInfo().getCreationTime() < commitTime2); assertEquals("Eclipse", company.getName()); + assertEquals(3, cdoObjectCompany.cdoRevision().getVersion()); resource.getContents().remove(company); long commitTime4 = transaction.commit().getTimeStamp(); |