Class VersionHistoryTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.version.AbstractVersionTest
-
- org.apache.jackrabbit.test.api.version.VersionHistoryTest
-
- All Implemented Interfaces:
junit.framework.Test
public class VersionHistoryTest extends AbstractVersionTest
VersionHistoryTest
provides test methods related to version history methods and general version history issues.
-
-
Field Summary
Fields Modifier and Type Field Description protected VersionHistory
vHistory
-
Fields inherited from class org.apache.jackrabbit.test.api.version.AbstractVersionTest
nonVersionableNode, nonVersionableNodeType, propertyValue, versionableNode, versionableNodeType
-
Fields inherited from class org.apache.jackrabbit.test.AbstractJCRTest
isReadOnly, jcrBaseVersion, jcrCopiedFrom, jcrCreated, jcrFrozenNode, jcrFrozenUuid, jcrIsCheckedOut, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixShareable, mixSimpleVersionable, mixTitle, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntActivity, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testNodeTypeTestRoot, testPath, testRoot, testRootNode, vf, workspaceName
-
-
Constructor Summary
Constructors Constructor Description VersionHistoryTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
setUp()
protected void
tearDown()
void
testAccept()
Tests ifVersionHistory.accept(ItemVisitor)
accepts a ItemVisitor and if the right Node is provided to that visitor.void
testAddMixin()
Tests ifVersionHistory.addMixin(String)
throws aConstraintViolationException
void
testAddNode()
Tests ifVersionHistory.addNode(String)
andVersionHistory.addNode(String, String)
throw aConstraintViolationException
void
testAutocreatedRootVersion()
Test if initially there is an auto-created root version present in the version history.void
testCanAddMixin()
Tests ifVersionHistory.canAddMixin(String)
returnsfalse
void
testCancelMerge()
Tests ifVersionHistory.cancelMerge(Version)
throws anUnsupportedRepositoryOperationException
void
testCancelMergeJcr2()
Tests ifVersionHistory.cancelMerge(Version)
throws anUnsupportedRepositoryOperationException
void
testCheckin()
Tests ifVersionHistory.checkin()
throws anUnsupportedRepositoryOperationException
void
testCheckinJcr2()
Tests ifVersionHistory.checkin()
throws anUnsupportedRepositoryOperationException
void
testCheckout()
Tests ifVersionHistory.checkout()
throws anUnsupportedRepositoryOperationException
void
testCheckoutJcr2()
Tests ifVersionHistory.checkout()
throws anUnsupportedRepositoryOperationException
void
testDoneMerge()
Tests ifVersionHistory.doneMerge(Version)
throws anUnsupportedRepositoryOperationException
void
testDoneMergeJcr2()
Tests ifVersionHistory.doneMerge(Version)
throws anUnsupportedRepositoryOperationException
void
testGetAllFrozenNodes()
Test thatVersionHistory.getAllFrozenNodes()
returns an iterator containing the frozen nodes of all versions that have been created byVersionManager.checkpoint(String)
.void
testGetAllVersions()
Test thatVersionHistory.getAllVersions()
returns an iterator containing the root version and all versions that have been created by Node.checkin().void
testGetAllVersionsJcr2()
Test thatVersionHistory.getAllVersions()
returns an iterator containing the root version and all versions that have been created by Node.checkin().void
testGetAncestor()
Tests ifVersionHistory.getAncestor(int)
returns the right ancestorvoid
testGetBaseVersion()
Tests ifVersionHistory.getBaseVersion()
throws anUnsupportedRepositoryOperationException
void
testGetBaseVersionJcr2()
Tests ifVersionHistory.getBaseVersion()
throws anUnsupportedRepositoryOperationException
void
testGetCorrespondingNodePath()
Tests ifVersionHistory.getCorrespondingNodePath(String)
returns the right pathvoid
testGetDepth()
Tests ifVersionHistory.getDepth()
returns the right depthvoid
testGetIdentifier()
Tests ifVersionHistory.getIdentifier()
returns the right UUIDvoid
testGetIndex()
Tests ifVersionHistory.getIndex()
returns the right indexvoid
testGetLock()
Tests ifVersionHistory.getLock()
throws anLockException
void
testGetLockJcr2()
Tests ifVersionHistory.getLock()
throws anLockException
void
testGetMixinNodeTypes()
Tests ifVersionHistory.getMixinNodeTypes()
does not return null.void
testGetName()
Tests ifVersionHistory.getName()
returns the right namevoid
testGetNode()
Tests ifVersionHistory.getNode(String)
returns the right child Nodevoid
testGetNodes()
Tests ifVersionHistory.getNodes()
andVersionHistory.getNodes(String)
returns the right child Nodevoid
testGetParent()
Tests ifVersionHistory.getParent()
returns the right parent Nodevoid
testGetPath()
Tests ifVersionHistory.getPath()
returns the right pathvoid
testGetPrimaryItem()
Tests ifVersionHistory.getPrimaryItem()
throws aItemNotFoundException
void
testGetPrimaryNodeType()
Tests ifVersionHistory.getPrimaryNodeType()
returns the right primary node typent:versionHistory
void
testGetProperties()
Tests ifVersionHistory.getProperties()
andVersionHistory.getProperties(String)
return the right propertyvoid
testGetProperty()
Tests ifVersionHistory.getProperty(String)
returns the right propertyvoid
testGetReferences()
Tests ifVersionHistory.getReferences()
returns the right reference of the versionable nodevoid
testGetSession()
Tests ifVersionHistory.getSession()
returns the right sessionvoid
testGetUUID()
Tests ifVersionHistory.getUUID()
returns the right UUIDvoid
testGetVersion()
Test VersionHistory.getVersion(String versionName) if 'versionName' is the name of an existing version (created by Node.checkin()).void
testGetVersionHistory()
Tests ifVersionHistory.getVersionHistory()
throws anUnsupportedRepositoryOperationException
void
testGetVersionHistoryJcr2()
Tests ifVersionHistory.getVersionHistory()
throws anUnsupportedRepositoryOperationException
void
testGetVersionHistoryOnNonVersionableNode()
Test if UnsupportedRepositoryOperationException is thrown when calling Node.getVersionHistory() on a non-versionable node.void
testGetVersionHistoryOnNonVersionableNodeJcr2()
Test if UnsupportedRepositoryOperationException is thrown when calling Node.getVersionHistory() on a non-versionable node.void
testHasNode()
Tests ifVersionHistory.hasNode(String)
returns the rightboolean
valuevoid
testHasNodes()
Tests ifVersionHistory.hasNodes()
returnstrue
void
testHasProperties()
Tests ifVersionHistory.hasProperties()
returnstrue
void
testHasProperty()
Tests ifVersionHistory.hasProperty(String)
returns the rightboolean
valuevoid
testHoldsLock()
Tests ifVersionHistory.holdsLock()
returnsfalse
void
testHoldsLockJcr2()
Tests ifVersionHistory.holdsLock()
returnsfalse
void
testInitiallyGetAllLinearVersionsContainsTheRootAndTheBaseVersion()
Test if the iterator returned byVersionHistory.getAllLinearVersions()
contains both the root and the base version upon creation of the version history.void
testInitiallyGetAllVersionsContainsTheRootVersion()
Test if the iterator returned byVersionHistory.getAllVersions()
contains the root version upon creation of the version history.void
testInitialNumberOfLinearVersions()
The version history must initially contain two versions (root version + first test version) - linear variantvoid
testInitialNumberOfVersions()
The version history must initially contain two versions (root version + first test version).void
testIsCheckedOut()
Tests ifVersionHistory.isCheckedOut()
returnstrue
void
testIsCheckedOutJcr2()
Tests ifVersionHistory.isCheckedOut()
returnstrue
void
testIsLocked()
Tests ifVersionHistory.isLocked()
returnsfalse
void
testIsLockedJcr2()
Tests ifVersionHistory.isLocked()
returnsfalse
void
testIsModified()
Tests ifVersionHistory.isModified()
returnsfalse
void
testIsNew()
Tests ifVersionHistory.isNew()
returnsfalse
void
testIsNode()
Tests ifVersionHistory.isNode()
returnstrue
void
testIsNodeType()
Tests ifVersionHistory.isNodeType(String)
returns the rightboolean
valuevoid
testIsSame()
Tests ifVersionHistory.isSame()
returns the rightboolean
valuevoid
testLock()
Tests ifVersionHistory.lock(boolean, boolean)
throws aLockException
void
testLockJcr2()
Tests ifVersionHistory.lock(boolean, boolean)
throws aLockException
void
testMerge()
Tests ifVersionHistory.merge(String)
throws anConstraintViolationException
void
testOrderBefore()
Tests ifVersionHistory.orderBefore(String, String)
throws anUnsupportedRepositoryOperationException
void
testRefresh()
Tests ifVersionHistory.refresh(boolean)
works as expected (do nothing and return quietly)void
testRemove()
Tests ifVersionHistory.remove()
throws anConstraintViolationException
void
testRemoveMixin()
Tests ifVersionHistory.removeMixin(String)
throws anNoSuchNodeTypeException
void
testRestore()
Tests ifVersionHistory.restore(String, boolean)
andVersionHistory.restore(Version, boolean)
throw anUnsupportedRepositoryOperationException
andVersionHistory.restore(Version, String, boolean)
throws aConstraintViolationException
.void
testRestoreByLabel()
Tests ifVersionHistory.restoreByLabel(String, boolean)
throws anUnsupportedRepositoryOperationException
void
testRestoreByLabelJcr2()
Tests ifVersionHistory.restoreByLabel(String, boolean)
throws anUnsupportedRepositoryOperationException
void
testRestoreJcr2()
Tests ifVersionHistory.restore(String, boolean)
andVersionHistory.restore(Version, boolean)
throw anUnsupportedRepositoryOperationException
andVersionHistory.restore(Version, String, boolean)
throws aConstraintViolationException
.void
testSetProperty()
Tests ifVersionHistory.setProperty(String, String[])
VersionHistory.setProperty(String, String[], int)
VersionHistory.setProperty(String, Value[])
VersionHistory.setProperty(String, Value[], int)
VersionHistory.setProperty(String, boolean)
VersionHistory.setProperty(String, double)
VersionHistory.setProperty(String, InputStream)
VersionHistory.setProperty(String, String)
VersionHistory.setProperty(String, Calendar)
VersionHistory.setProperty(String, Node)
VersionHistory.setProperty(String, Value)
VersionHistory.setProperty(String, long)
all throw aConstraintViolationException
void
testUnlock()
Tests ifVersionHistory.unlock()
throws aLockException
void
testUnlockJcr2()
Tests ifVersionHistory.unlock()
throws aLockException
void
testUpdate()
Tests ifVersionHistory.update(String)
throws anConstraintViolationException
-
Methods inherited from class org.apache.jackrabbit.test.api.version.AbstractVersionTest
createVersionableNode, getNumberOfVersions
-
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, run
-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, runBare, runTest, setName, toString
-
-
-
-
Field Detail
-
vHistory
protected VersionHistory vHistory
-
-
Method Detail
-
setUp
protected void setUp() throws Exception
- Overrides:
setUp
in classAbstractVersionTest
- Throws:
Exception
-
tearDown
protected void tearDown() throws Exception
- Overrides:
tearDown
in classAbstractVersionTest
- Throws:
Exception
-
testAutocreatedRootVersion
public void testAutocreatedRootVersion() throws RepositoryException
Test if initially there is an auto-created root version present in the version history.- Throws:
RepositoryException
-
testInitialNumberOfVersions
public void testInitialNumberOfVersions() throws RepositoryException
The version history must initially contain two versions (root version + first test version).- Throws:
RepositoryException
-
testInitialNumberOfLinearVersions
public void testInitialNumberOfLinearVersions() throws RepositoryException
The version history must initially contain two versions (root version + first test version) - linear variant- Throws:
RepositoryException
- Since:
- JCR 2.0
-
testInitiallyGetAllVersionsContainsTheRootVersion
public void testInitiallyGetAllVersionsContainsTheRootVersion() throws RepositoryException
Test if the iterator returned byVersionHistory.getAllVersions()
contains the root version upon creation of the version history.- Throws:
RepositoryException
- See Also:
VersionHistory.getRootVersion()
-
testInitiallyGetAllLinearVersionsContainsTheRootAndTheBaseVersion
public void testInitiallyGetAllLinearVersionsContainsTheRootAndTheBaseVersion() throws RepositoryException
Test if the iterator returned byVersionHistory.getAllLinearVersions()
contains both the root and the base version upon creation of the version history.- Throws:
RepositoryException
- Since:
- JCR 2.0
-
testGetAllVersions
public void testGetAllVersions() throws RepositoryException
Test thatVersionHistory.getAllVersions()
returns an iterator containing the root version and all versions that have been created by Node.checkin().- Throws:
RepositoryException
- See Also:
VersionHistory.getAllVersions()
-
testGetAllVersionsJcr2
public void testGetAllVersionsJcr2() throws RepositoryException
Test thatVersionHistory.getAllVersions()
returns an iterator containing the root version and all versions that have been created by Node.checkin().- Throws:
RepositoryException
- See Also:
VersionHistory.getAllVersions()
-
testGetAllFrozenNodes
public void testGetAllFrozenNodes() throws RepositoryException
Test thatVersionHistory.getAllFrozenNodes()
returns an iterator containing the frozen nodes of all versions that have been created byVersionManager.checkpoint(String)
.- Throws:
RepositoryException
- Since:
- JCR 2.0
- See Also:
VersionHistory.getAllFrozenNodes()
-
testGetVersionHistoryOnNonVersionableNode
public void testGetVersionHistoryOnNonVersionableNode() throws RepositoryException
Test if UnsupportedRepositoryOperationException is thrown when calling Node.getVersionHistory() on a non-versionable node.- Throws:
RepositoryException
-
testGetVersionHistoryOnNonVersionableNodeJcr2
public void testGetVersionHistoryOnNonVersionableNodeJcr2() throws RepositoryException
Test if UnsupportedRepositoryOperationException is thrown when calling Node.getVersionHistory() on a non-versionable node.- Throws:
RepositoryException
-
testGetVersion
public void testGetVersion() throws RepositoryException
Test VersionHistory.getVersion(String versionName) if 'versionName' is the name of an existing version (created by Node.checkin()).- Throws:
RepositoryException
- See Also:
VersionHistory.getVersion(String)
-
testAccept
public void testAccept() throws Exception
Tests ifVersionHistory.accept(ItemVisitor)
accepts a ItemVisitor and if the right Node is provided to that visitor.- Throws:
Exception
-
testAddMixin
public void testAddMixin() throws Exception
Tests ifVersionHistory.addMixin(String)
throws aConstraintViolationException
- Throws:
Exception
-
testAddNode
public void testAddNode() throws Exception
Tests ifVersionHistory.addNode(String)
andVersionHistory.addNode(String, String)
throw aConstraintViolationException
- Throws:
Exception
-
testCanAddMixin
public void testCanAddMixin() throws Exception
Tests ifVersionHistory.canAddMixin(String)
returnsfalse
- Throws:
Exception
-
testCancelMerge
public void testCancelMerge() throws Exception
Tests ifVersionHistory.cancelMerge(Version)
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testCancelMergeJcr2
public void testCancelMergeJcr2() throws Exception
Tests ifVersionHistory.cancelMerge(Version)
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testCheckin
public void testCheckin() throws Exception
Tests ifVersionHistory.checkin()
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testCheckinJcr2
public void testCheckinJcr2() throws Exception
Tests ifVersionHistory.checkin()
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testCheckout
public void testCheckout() throws Exception
Tests ifVersionHistory.checkout()
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testCheckoutJcr2
public void testCheckoutJcr2() throws Exception
Tests ifVersionHistory.checkout()
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testDoneMerge
public void testDoneMerge() throws Exception
Tests ifVersionHistory.doneMerge(Version)
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testDoneMergeJcr2
public void testDoneMergeJcr2() throws Exception
Tests ifVersionHistory.doneMerge(Version)
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testGetAncestor
public void testGetAncestor() throws Exception
Tests ifVersionHistory.getAncestor(int)
returns the right ancestor- Throws:
Exception
-
testGetBaseVersion
public void testGetBaseVersion() throws Exception
Tests ifVersionHistory.getBaseVersion()
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testGetBaseVersionJcr2
public void testGetBaseVersionJcr2() throws Exception
Tests ifVersionHistory.getBaseVersion()
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testGetCorrespondingNodePath
public void testGetCorrespondingNodePath() throws Exception
Tests ifVersionHistory.getCorrespondingNodePath(String)
returns the right path- Throws:
Exception
-
testGetDepth
public void testGetDepth() throws Exception
Tests ifVersionHistory.getDepth()
returns the right depth- Throws:
Exception
-
testGetIndex
public void testGetIndex() throws Exception
Tests ifVersionHistory.getIndex()
returns the right index- Throws:
Exception
-
testGetLock
public void testGetLock() throws Exception
Tests ifVersionHistory.getLock()
throws anLockException
- Throws:
Exception
-
testGetLockJcr2
public void testGetLockJcr2() throws Exception
Tests ifVersionHistory.getLock()
throws anLockException
- Throws:
Exception
-
testGetMixinNodeTypes
public void testGetMixinNodeTypes() throws Exception
Tests ifVersionHistory.getMixinNodeTypes()
does not return null.- Throws:
Exception
-
testGetName
public void testGetName() throws Exception
Tests ifVersionHistory.getName()
returns the right name- Throws:
Exception
-
testGetNode
public void testGetNode() throws Exception
Tests ifVersionHistory.getNode(String)
returns the right child Node- Throws:
Exception
-
testGetNodes
public void testGetNodes() throws Exception
Tests ifVersionHistory.getNodes()
andVersionHistory.getNodes(String)
returns the right child Node- Throws:
Exception
-
testGetParent
public void testGetParent() throws Exception
Tests ifVersionHistory.getParent()
returns the right parent Node- Throws:
Exception
-
testGetPath
public void testGetPath() throws Exception
Tests ifVersionHistory.getPath()
returns the right path- Throws:
Exception
-
testGetPrimaryItem
public void testGetPrimaryItem() throws Exception
Tests ifVersionHistory.getPrimaryItem()
throws aItemNotFoundException
- Throws:
Exception
-
testGetPrimaryNodeType
public void testGetPrimaryNodeType() throws Exception
Tests ifVersionHistory.getPrimaryNodeType()
returns the right primary node typent:versionHistory
- Throws:
Exception
-
testGetProperties
public void testGetProperties() throws Exception
Tests ifVersionHistory.getProperties()
andVersionHistory.getProperties(String)
return the right property- Throws:
Exception
-
testGetProperty
public void testGetProperty() throws Exception
Tests ifVersionHistory.getProperty(String)
returns the right property- Throws:
Exception
-
testGetReferences
public void testGetReferences() throws Exception
Tests ifVersionHistory.getReferences()
returns the right reference of the versionable node- Throws:
Exception
-
testGetSession
public void testGetSession() throws Exception
Tests ifVersionHistory.getSession()
returns the right session- Throws:
Exception
-
testGetUUID
public void testGetUUID() throws Exception
Tests ifVersionHistory.getUUID()
returns the right UUID- Throws:
Exception
-
testGetIdentifier
public void testGetIdentifier() throws Exception
Tests ifVersionHistory.getIdentifier()
returns the right UUID- Throws:
Exception
-
testGetVersionHistory
public void testGetVersionHistory() throws Exception
Tests ifVersionHistory.getVersionHistory()
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testGetVersionHistoryJcr2
public void testGetVersionHistoryJcr2() throws Exception
Tests ifVersionHistory.getVersionHistory()
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testHasNode
public void testHasNode() throws Exception
Tests ifVersionHistory.hasNode(String)
returns the rightboolean
value- Throws:
Exception
-
testHasNodes
public void testHasNodes() throws Exception
Tests ifVersionHistory.hasNodes()
returnstrue
- Throws:
Exception
-
testHasProperties
public void testHasProperties() throws Exception
Tests ifVersionHistory.hasProperties()
returnstrue
- Throws:
Exception
-
testHasProperty
public void testHasProperty() throws Exception
Tests ifVersionHistory.hasProperty(String)
returns the rightboolean
value- Throws:
Exception
-
testHoldsLock
public void testHoldsLock() throws Exception
Tests ifVersionHistory.holdsLock()
returnsfalse
- Throws:
Exception
-
testHoldsLockJcr2
public void testHoldsLockJcr2() throws Exception
Tests ifVersionHistory.holdsLock()
returnsfalse
- Throws:
Exception
-
testIsCheckedOut
public void testIsCheckedOut() throws Exception
Tests ifVersionHistory.isCheckedOut()
returnstrue
- Throws:
Exception
-
testIsCheckedOutJcr2
public void testIsCheckedOutJcr2() throws Exception
Tests ifVersionHistory.isCheckedOut()
returnstrue
- Throws:
Exception
-
testIsLocked
public void testIsLocked() throws Exception
Tests ifVersionHistory.isLocked()
returnsfalse
- Throws:
Exception
-
testIsLockedJcr2
public void testIsLockedJcr2() throws Exception
Tests ifVersionHistory.isLocked()
returnsfalse
- Throws:
Exception
-
testIsModified
public void testIsModified() throws Exception
Tests ifVersionHistory.isModified()
returnsfalse
- Throws:
Exception
-
testIsNew
public void testIsNew() throws Exception
Tests ifVersionHistory.isNew()
returnsfalse
- Throws:
Exception
-
testIsNode
public void testIsNode() throws Exception
Tests ifVersionHistory.isNode()
returnstrue
- Throws:
Exception
-
testIsNodeType
public void testIsNodeType() throws Exception
Tests ifVersionHistory.isNodeType(String)
returns the rightboolean
value- Throws:
Exception
-
testIsSame
public void testIsSame() throws Exception
Tests ifVersionHistory.isSame()
returns the rightboolean
value- Throws:
Exception
-
testLock
public void testLock() throws Exception
Tests ifVersionHistory.lock(boolean, boolean)
throws aLockException
- Throws:
Exception
-
testLockJcr2
public void testLockJcr2() throws Exception
Tests ifVersionHistory.lock(boolean, boolean)
throws aLockException
- Throws:
Exception
-
testMerge
public void testMerge() throws Exception
Tests ifVersionHistory.merge(String)
throws anConstraintViolationException
- Throws:
Exception
-
testOrderBefore
public void testOrderBefore() throws Exception
Tests ifVersionHistory.orderBefore(String, String)
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testRefresh
public void testRefresh() throws Exception
Tests ifVersionHistory.refresh(boolean)
works as expected (do nothing and return quietly)- Throws:
Exception
-
testRemove
public void testRemove() throws Exception
Tests ifVersionHistory.remove()
throws anConstraintViolationException
- Throws:
Exception
-
testRemoveMixin
public void testRemoveMixin() throws Exception
Tests ifVersionHistory.removeMixin(String)
throws anNoSuchNodeTypeException
- Throws:
Exception
-
testRestore
public void testRestore() throws Exception
Tests ifVersionHistory.restore(String, boolean)
andVersionHistory.restore(Version, boolean)
throw anUnsupportedRepositoryOperationException
andVersionHistory.restore(Version, String, boolean)
throws aConstraintViolationException
.- Throws:
Exception
-
testRestoreJcr2
public void testRestoreJcr2() throws Exception
Tests ifVersionHistory.restore(String, boolean)
andVersionHistory.restore(Version, boolean)
throw anUnsupportedRepositoryOperationException
andVersionHistory.restore(Version, String, boolean)
throws aConstraintViolationException
.- Throws:
Exception
-
testRestoreByLabel
public void testRestoreByLabel() throws Exception
Tests ifVersionHistory.restoreByLabel(String, boolean)
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testRestoreByLabelJcr2
public void testRestoreByLabelJcr2() throws Exception
Tests ifVersionHistory.restoreByLabel(String, boolean)
throws anUnsupportedRepositoryOperationException
- Throws:
Exception
-
testSetProperty
public void testSetProperty() throws Exception
Tests ifVersionHistory.setProperty(String, String[])
VersionHistory.setProperty(String, String[], int)
VersionHistory.setProperty(String, Value[])
VersionHistory.setProperty(String, Value[], int)
VersionHistory.setProperty(String, boolean)
VersionHistory.setProperty(String, double)
VersionHistory.setProperty(String, InputStream)
VersionHistory.setProperty(String, String)
VersionHistory.setProperty(String, Calendar)
VersionHistory.setProperty(String, Node)
VersionHistory.setProperty(String, Value)
VersionHistory.setProperty(String, long)
ConstraintViolationException
- Throws:
Exception
-
testUnlock
public void testUnlock() throws Exception
Tests ifVersionHistory.unlock()
throws aLockException
- Throws:
Exception
-
testUnlockJcr2
public void testUnlockJcr2() throws Exception
Tests ifVersionHistory.unlock()
throws aLockException
- Throws:
Exception
-
testUpdate
public void testUpdate() throws Exception
Tests ifVersionHistory.update(String)
throws anConstraintViolationException
- Throws:
Exception
-
-