public class VersionTest extends AbstractVersionTest
VersionTest covers tests related to the methods of the Version class.nonVersionableNode, nonVersionableNodeType, propertyValue, versionableNode, versionableNodeTypeisReadOnly, 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 and Description |
|---|
VersionTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
setUp() |
protected void |
tearDown() |
void |
testAccept()
Tests if
Version.accept(ItemVisitor) accepts a ItemVisitor
and if the right Node is provided to that visitor. |
void |
testAddMixin()
Tests if
Version.addMixin(String) throws a ConstraintViolationException |
void |
testAddNode()
Tests if
Version.addNode(String) and
Version.addNode(String, String) throw a ConstraintViolationException |
void |
testCanAddMixin()
Tests if
Version.canAddMixin(String) returns
false |
void |
testCancelMerge()
Tests if
Version.cancelMerge(Version) throws an UnsupportedRepositoryOperationException |
void |
testCancelMergeJcr2()
Tests if
Version.cancelMerge(Version) throws an UnsupportedRepositoryOperationException |
void |
testCheckin()
Tests if
Version.checkin() throws an UnsupportedRepositoryOperationException |
void |
testCheckinJcr2()
Tests if
Version.checkin() throws an UnsupportedRepositoryOperationException |
void |
testCheckout()
Tests if
Version.checkout() throws an UnsupportedRepositoryOperationException |
void |
testCheckoutJcr2()
Tests if
Version.checkout() throws an UnsupportedRepositoryOperationException |
void |
testDoneMerge()
Tests if
Version.doneMerge(Version) throws an UnsupportedRepositoryOperationException |
void |
testDoneMergeJcr2()
Tests if
Version.doneMerge(Version) throws an UnsupportedRepositoryOperationException |
void |
testFrozenUUID()
Tests if the jcr:frozenUuid property has the correct type
|
void |
testGetAncestor()
Tests if
Version.getAncestor(int) returns the right
ancestor |
void |
testGetBaseVersion()
Tests if
Version.getBaseVersion() throws an UnsupportedRepositoryOperationException |
void |
testGetBaseVersionJcr2()
Tests if
Version.getBaseVersion() throws an UnsupportedRepositoryOperationException |
void |
testGetCorrespondingNodePath()
Tests if
Version.getCorrespondingNodePath(String) returns
the right path |
void |
testGetDepth()
Tests if
Version.getDepth() returns the right depth |
void |
testGetIndex()
Tests if
Version.getIndex() returns the right index |
void |
testGetLock()
Tests if
Version.getLock() throws a LockException |
void |
testGetLockJcr2()
Tests if
Version.getLock() throws a LockException |
void |
testGetMixinNodeTypes()
Tests if
Version.getMixinNodeTypes() does not return null. |
void |
testGetName()
Tests if
Version.getName() returns the right name |
void |
testGetNode()
Tests if
Version.getNode(String) returns the right child
Node |
void |
testGetNodes()
Tests if
Version.getNodes() and Version.getNodes(String)
returns the right child Node |
void |
testGetParent()
Tests if
Version.getParent() returns the right parent Node |
void |
testGetPath()
Tests if
Version.getPath() returns the right path |
void |
testGetPrimaryItem()
Tests if
Version.getPrimaryItem() throws a ItemNotFoundException |
void |
testGetPrimaryNodeType()
Tests if
Version.getPrimaryNodeType() returns the right
primary node type nt:version |
void |
testGetProperties()
Tests if
Version.getProperties() and
Version.getProperties(String) return the right property |
void |
testGetProperty()
Tests if
Version.getProperty(String) returns the right
property |
void |
testGetSession()
Tests if
Version.getSession() returns the right session |
void |
testGetUUID()
Tests if
Version.getUUID() returns the right UUID |
void |
testGetVersionHistory()
Tests if
Version.getVersionHistory() throws an UnsupportedRepositoryOperationException |
void |
testGetVersionHistoryJcr2()
Tests if
Version.getVersionHistory() throws an UnsupportedRepositoryOperationException |
void |
testHasNode()
Tests if
Version.hasNode(String) returns the right
boolean value |
void |
testHasNodes()
Tests if
Version.hasNodes() returns true |
void |
testHasProperties()
Tests if
Version.hasProperties() returns true |
void |
testHasProperty()
Tests if
Version.hasProperty(String) returns the right
boolean value |
void |
testHoldsLock()
Tests if
Version.holdsLock() returns false |
void |
testHoldsLockJcr2()
Tests if
Version.holdsLock() returns false |
void |
testIsCheckedOut()
Tests if
Version.isCheckedOut() returns true |
void |
testIsCheckedOutJcr2()
Tests if
Version.isCheckedOut() returns true |
void |
testIsLocked()
Tests if
Version.isLocked() returns false |
void |
testIsLockedJcr2()
Tests if
Version.isLocked() returns false |
void |
testIsModified()
Tests if
Version.isModified() returns false |
void |
testIsNew()
Tests if
Version.isNew() returns false |
void |
testIsNode()
Tests if
Version.isNode() returns true |
void |
testIsNodeType()
Tests if
Version.isNodeType(String) returns the right
boolean value |
void |
testIsSame()
Tests if
Version.isSame() returns the right
boolean value |
void |
testIsSameJcr2()
Tests if
Version.isSame() returns the right
boolean value |
void |
testLock()
Tests if
Version.lock(boolean, boolean) throws a LockException |
void |
testLockJcr2()
Tests if
Version.lock(boolean, boolean) throws a LockException |
void |
testMerge()
Tests if
Version.merge(String) throws an
ConstraintViolationException |
void |
testOrderBefore()
Tests if
Version.orderBefore(String, String) throws an
UnsupportedRepositoryOperationException |
void |
testRefresh()
Tests if
Version.refresh(boolean) works as expected (do
nothing and return quietly) |
void |
testRemove()
Tests if
Version.remove() throws an ConstraintViolationException |
void |
testRemoveMixin()
Tests if
Version.removeMixin(String) throws an ConstraintViolationException |
void |
testRestore()
Tests if
Version.restore(String, boolean) and
Version.restore(Version, boolean) throw an
UnsupportedRepositoryOperationException and
Version.restore(Version, String, boolean) throws a
ConstraintViolationException. |
void |
testRestoreByLabel()
Tests if
Version.restoreByLabel(String, boolean) throws an
UnsupportedRepositoryOperationException |
void |
testRestoreByLabelJcr2()
Tests if
Version.restoreByLabel(String, boolean) throws an
UnsupportedRepositoryOperationException |
void |
testRestoreJcr2()
Tests if
Version.restore(String, boolean) and
Version.restore(Version, boolean) throw an
UnsupportedRepositoryOperationException and
Version.restore(Version, String, boolean) throws a
ConstraintViolationException. |
void |
testSetProperty()
Tests if
Version.setProperty(String, String[])
Version.setProperty(String, String[], int)
Version.setProperty(String, Value[])
Version.setProperty(String, Value[], int)
Version.setProperty(String, boolean)
Version.setProperty(String, double)
Version.setProperty(String, InputStream)
Version.setProperty(String, String)
Version.setProperty(String, Calendar)
Version.setProperty(String, Node)
Version.setProperty(String, Value)
Version.setProperty(String, long)
all throw a
ConstraintViolationException |
void |
testUnlock()
Tests if
Version.unlock() throws a LockException |
void |
testUnlockJcr2()
Tests if
Version.unlock() throws a LockException |
void |
testUpdate()
Tests if
VersionHistory.update(String) throws an
ConstraintViolationException |
createVersionableNode, getNumberOfVersionscheckSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, runassertEquals, 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, toStringprotected void setUp()
throws Exception
setUp in class AbstractVersionTestExceptionprotected void tearDown()
throws Exception
tearDown in class AbstractVersionTestExceptionpublic void testAccept()
throws Exception
Version.accept(ItemVisitor) accepts a ItemVisitor
and if the right Node is provided to that visitor.Exceptionpublic void testAddMixin()
throws Exception
Version.addMixin(String) throws a ConstraintViolationExceptionExceptionpublic void testAddNode()
throws Exception
Version.addNode(String) and
Version.addNode(String, String) throw a ConstraintViolationExceptionExceptionpublic void testCanAddMixin()
throws Exception
Version.canAddMixin(String) returns
falseExceptionpublic void testCancelMerge()
throws Exception
Version.cancelMerge(Version) throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testCancelMergeJcr2()
throws Exception
Version.cancelMerge(Version) throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testCheckin()
throws Exception
Version.checkin() throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testCheckinJcr2()
throws Exception
Version.checkin() throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testCheckout()
throws Exception
Version.checkout() throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testCheckoutJcr2()
throws Exception
Version.checkout() throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testDoneMerge()
throws Exception
Version.doneMerge(Version) throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testDoneMergeJcr2()
throws Exception
Version.doneMerge(Version) throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testGetAncestor()
throws Exception
Version.getAncestor(int) returns the right
ancestorExceptionpublic void testGetBaseVersion()
throws Exception
Version.getBaseVersion() throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testGetBaseVersionJcr2()
throws Exception
Version.getBaseVersion() throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testGetCorrespondingNodePath()
throws Exception
Version.getCorrespondingNodePath(String) returns
the right pathExceptionpublic void testGetDepth()
throws Exception
Version.getDepth() returns the right depthExceptionpublic void testGetIndex()
throws Exception
Version.getIndex() returns the right indexExceptionpublic void testGetLock()
throws Exception
Version.getLock() throws a LockExceptionExceptionpublic void testGetLockJcr2()
throws Exception
Version.getLock() throws a LockExceptionExceptionpublic void testGetMixinNodeTypes()
throws Exception
Version.getMixinNodeTypes() does not return null.Exceptionpublic void testGetName()
throws Exception
Version.getName() returns the right nameExceptionpublic void testGetNode()
throws Exception
Version.getNode(String) returns the right child
NodeExceptionpublic void testGetNodes()
throws Exception
Version.getNodes() and Version.getNodes(String)
returns the right child NodeExceptionpublic void testGetParent()
throws Exception
Version.getParent() returns the right parent NodeExceptionpublic void testGetPath()
throws Exception
Version.getPath() returns the right pathExceptionpublic void testGetPrimaryItem()
throws Exception
Version.getPrimaryItem() throws a ItemNotFoundExceptionExceptionpublic void testGetPrimaryNodeType()
throws Exception
Version.getPrimaryNodeType() returns the right
primary node type nt:versionExceptionpublic void testGetProperties()
throws Exception
Version.getProperties() and
Version.getProperties(String) return the right propertyExceptionpublic void testGetProperty()
throws Exception
Version.getProperty(String) returns the right
propertyExceptionpublic void testGetSession()
throws Exception
Version.getSession() returns the right sessionExceptionpublic void testGetVersionHistory()
throws Exception
Version.getVersionHistory() throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testGetVersionHistoryJcr2()
throws Exception
Version.getVersionHistory() throws an UnsupportedRepositoryOperationExceptionExceptionpublic void testGetUUID()
throws Exception
Version.getUUID() returns the right UUIDExceptionpublic void testHasNode()
throws Exception
Version.hasNode(String) returns the right
boolean valueExceptionpublic void testHasNodes()
throws Exception
Version.hasNodes() returns trueExceptionpublic void testHasProperties()
throws Exception
Version.hasProperties() returns trueExceptionpublic void testHasProperty()
throws Exception
Version.hasProperty(String) returns the right
boolean valueExceptionpublic void testHoldsLock()
throws Exception
Version.holdsLock() returns falseExceptionpublic void testHoldsLockJcr2()
throws Exception
Version.holdsLock() returns falseExceptionpublic void testIsCheckedOut()
throws Exception
Version.isCheckedOut() returns trueExceptionpublic void testIsCheckedOutJcr2()
throws Exception
Version.isCheckedOut() returns trueExceptionpublic void testIsLocked()
throws Exception
Version.isLocked() returns falseExceptionpublic void testIsLockedJcr2()
throws Exception
Version.isLocked() returns falseExceptionpublic void testIsModified()
throws Exception
Version.isModified() returns falseExceptionpublic void testIsNew()
throws Exception
Version.isNew() returns falseExceptionpublic void testIsNode()
throws Exception
Version.isNode() returns trueExceptionpublic void testIsNodeType()
throws Exception
Version.isNodeType(String) returns the right
boolean valueExceptionpublic void testIsSame()
throws Exception
Version.isSame() returns the right
boolean valueExceptionpublic void testIsSameJcr2()
throws Exception
Version.isSame() returns the right
boolean valueExceptionpublic void testLock()
throws Exception
Version.lock(boolean, boolean) throws a LockExceptionExceptionpublic void testLockJcr2()
throws Exception
Version.lock(boolean, boolean) throws a LockExceptionExceptionpublic void testMerge()
throws Exception
Version.merge(String) throws an
ConstraintViolationExceptionExceptionpublic void testOrderBefore()
throws Exception
Version.orderBefore(String, String) throws an
UnsupportedRepositoryOperationExceptionExceptionpublic void testRefresh()
throws Exception
Version.refresh(boolean) works as expected (do
nothing and return quietly)Exceptionpublic void testRemove()
throws Exception
Version.remove() throws an ConstraintViolationExceptionExceptionpublic void testRemoveMixin()
throws Exception
Version.removeMixin(String) throws an ConstraintViolationExceptionExceptionpublic void testRestore()
throws Exception
Version.restore(String, boolean) and
Version.restore(Version, boolean) throw an
UnsupportedRepositoryOperationException and
Version.restore(Version, String, boolean) throws a
ConstraintViolationException.Exceptionpublic void testRestoreJcr2()
throws Exception
Version.restore(String, boolean) and
Version.restore(Version, boolean) throw an
UnsupportedRepositoryOperationException and
Version.restore(Version, String, boolean) throws a
ConstraintViolationException.Exceptionpublic void testRestoreByLabel()
throws Exception
Version.restoreByLabel(String, boolean) throws an
UnsupportedRepositoryOperationExceptionExceptionpublic void testRestoreByLabelJcr2()
throws Exception
Version.restoreByLabel(String, boolean) throws an
UnsupportedRepositoryOperationExceptionExceptionpublic void testSetProperty()
throws Exception
Version.setProperty(String, String[])Version.setProperty(String, String[], int)Version.setProperty(String, Value[])Version.setProperty(String, Value[], int)Version.setProperty(String, boolean)Version.setProperty(String, double)Version.setProperty(String, InputStream)Version.setProperty(String, String)Version.setProperty(String, Calendar)Version.setProperty(String, Node)Version.setProperty(String, Value)Version.setProperty(String, long)ConstraintViolationExceptionExceptionpublic void testUnlock()
throws Exception
Version.unlock() throws a LockExceptionExceptionpublic void testUnlockJcr2()
throws Exception
Version.unlock() throws a LockExceptionExceptionpublic void testUpdate()
throws Exception
VersionHistory.update(String) throws an
ConstraintViolationExceptionExceptionCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.