public class VersionTest extends AbstractVersionTest
VersionTest
covers tests related to the methods of the Version
class.nonVersionableNode, nonVersionableNodeType, propertyValue, versionableNode, versionableNodeType
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 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, getNumberOfVersions
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, run
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
protected void setUp() throws Exception
setUp
in class AbstractVersionTest
Exception
protected void tearDown() throws Exception
tearDown
in class AbstractVersionTest
Exception
public void testAccept() throws Exception
Version.accept(ItemVisitor)
accepts a ItemVisitor
and if the right Node is provided to that visitor.Exception
public void testAddMixin() throws Exception
Version.addMixin(String)
throws a ConstraintViolationException
Exception
public void testAddNode() throws Exception
Version.addNode(String)
and
Version.addNode(String, String)
throw a ConstraintViolationException
Exception
public void testCanAddMixin() throws Exception
Version.canAddMixin(String)
returns
false
Exception
public void testCancelMerge() throws Exception
Version.cancelMerge(Version)
throws an UnsupportedRepositoryOperationException
Exception
public void testCancelMergeJcr2() throws Exception
Version.cancelMerge(Version)
throws an UnsupportedRepositoryOperationException
Exception
public void testCheckin() throws Exception
Version.checkin()
throws an UnsupportedRepositoryOperationException
Exception
public void testCheckinJcr2() throws Exception
Version.checkin()
throws an UnsupportedRepositoryOperationException
Exception
public void testCheckout() throws Exception
Version.checkout()
throws an UnsupportedRepositoryOperationException
Exception
public void testCheckoutJcr2() throws Exception
Version.checkout()
throws an UnsupportedRepositoryOperationException
Exception
public void testDoneMerge() throws Exception
Version.doneMerge(Version)
throws an UnsupportedRepositoryOperationException
Exception
public void testDoneMergeJcr2() throws Exception
Version.doneMerge(Version)
throws an UnsupportedRepositoryOperationException
Exception
public void testGetAncestor() throws Exception
Version.getAncestor(int)
returns the right
ancestorException
public void testGetBaseVersion() throws Exception
Version.getBaseVersion()
throws an UnsupportedRepositoryOperationException
Exception
public void testGetBaseVersionJcr2() throws Exception
Version.getBaseVersion()
throws an UnsupportedRepositoryOperationException
Exception
public void testGetCorrespondingNodePath() throws Exception
Version.getCorrespondingNodePath(String)
returns
the right pathException
public void testGetDepth() throws Exception
Version.getDepth()
returns the right depthException
public void testGetIndex() throws Exception
Version.getIndex()
returns the right indexException
public void testGetLock() throws Exception
Version.getLock()
throws a LockException
Exception
public void testGetLockJcr2() throws Exception
Version.getLock()
throws a LockException
Exception
public void testGetMixinNodeTypes() throws Exception
Version.getMixinNodeTypes()
does not return null.Exception
public void testGetName() throws Exception
Version.getName()
returns the right nameException
public void testGetNode() throws Exception
Version.getNode(String)
returns the right child
NodeException
public void testGetNodes() throws Exception
Version.getNodes()
and Version.getNodes(String)
returns the right child NodeException
public void testGetParent() throws Exception
Version.getParent()
returns the right parent NodeException
public void testGetPath() throws Exception
Version.getPath()
returns the right pathException
public void testGetPrimaryItem() throws Exception
Version.getPrimaryItem()
throws a ItemNotFoundException
Exception
public void testGetPrimaryNodeType() throws Exception
Version.getPrimaryNodeType()
returns the right
primary node type nt:version
Exception
public void testGetProperties() throws Exception
Version.getProperties()
and
Version.getProperties(String)
return the right propertyException
public void testGetProperty() throws Exception
Version.getProperty(String)
returns the right
propertyException
public void testGetSession() throws Exception
Version.getSession()
returns the right sessionException
public void testGetVersionHistory() throws Exception
Version.getVersionHistory()
throws an UnsupportedRepositoryOperationException
Exception
public void testGetVersionHistoryJcr2() throws Exception
Version.getVersionHistory()
throws an UnsupportedRepositoryOperationException
Exception
public void testGetUUID() throws Exception
Version.getUUID()
returns the right UUIDException
public void testHasNode() throws Exception
Version.hasNode(String)
returns the right
boolean
valueException
public void testHasNodes() throws Exception
Version.hasNodes()
returns true
Exception
public void testHasProperties() throws Exception
Version.hasProperties()
returns true
Exception
public void testHasProperty() throws Exception
Version.hasProperty(String)
returns the right
boolean
valueException
public void testHoldsLock() throws Exception
Version.holdsLock()
returns false
Exception
public void testHoldsLockJcr2() throws Exception
Version.holdsLock()
returns false
Exception
public void testIsCheckedOut() throws Exception
Version.isCheckedOut()
returns true
Exception
public void testIsCheckedOutJcr2() throws Exception
Version.isCheckedOut()
returns true
Exception
public void testIsLocked() throws Exception
Version.isLocked()
returns false
Exception
public void testIsLockedJcr2() throws Exception
Version.isLocked()
returns false
Exception
public void testIsModified() throws Exception
Version.isModified()
returns false
Exception
public void testIsNew() throws Exception
Version.isNew()
returns false
Exception
public void testIsNode() throws Exception
Version.isNode()
returns true
Exception
public void testIsNodeType() throws Exception
Version.isNodeType(String)
returns the right
boolean
valueException
public void testIsSame() throws Exception
Version.isSame()
returns the right
boolean
valueException
public void testIsSameJcr2() throws Exception
Version.isSame()
returns the right
boolean
valueException
public void testLock() throws Exception
Version.lock(boolean, boolean)
throws a LockException
Exception
public void testLockJcr2() throws Exception
Version.lock(boolean, boolean)
throws a LockException
Exception
public void testMerge() throws Exception
Version.merge(String)
throws an
ConstraintViolationException
Exception
public void testOrderBefore() throws Exception
Version.orderBefore(String, String)
throws an
UnsupportedRepositoryOperationException
Exception
public void testRefresh() throws Exception
Version.refresh(boolean)
works as expected (do
nothing and return quietly)Exception
public void testRemove() throws Exception
Version.remove()
throws an ConstraintViolationException
Exception
public void testRemoveMixin() throws Exception
Version.removeMixin(String)
throws an ConstraintViolationException
Exception
public 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
.Exception
public 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
.Exception
public void testRestoreByLabel() throws Exception
Version.restoreByLabel(String, boolean)
throws an
UnsupportedRepositoryOperationException
Exception
public void testRestoreByLabelJcr2() throws Exception
Version.restoreByLabel(String, boolean)
throws an
UnsupportedRepositoryOperationException
Exception
public 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)
ConstraintViolationException
Exception
public void testUnlock() throws Exception
Version.unlock()
throws a LockException
Exception
public void testUnlockJcr2() throws Exception
Version.unlock()
throws a LockException
Exception
public void testUpdate() throws Exception
VersionHistory.update(String)
throws an
ConstraintViolationException
Exception
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.