|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.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.VersionTest
public class VersionTest
VersionTest
covers tests related to the methods of the Version
class.
Field Summary |
---|
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, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testPath, testRoot, testRootNode, vf, workspaceName |
Fields inherited from class org.apache.jackrabbit.test.JUnitTest |
---|
log |
Constructor Summary | |
---|---|
VersionTest()
|
Method Summary | |
---|---|
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 |
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, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getProperty, getProperty, getSize, isSupported, needsMixin, run |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
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, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VersionTest()
Method Detail |
---|
protected void setUp() throws java.lang.Exception
setUp
in class AbstractVersionTest
java.lang.Exception
protected void tearDown() throws java.lang.Exception
tearDown
in class AbstractVersionTest
java.lang.Exception
public void testAccept() throws java.lang.Exception
Version.accept(ItemVisitor)
accepts a ItemVisitor
and if the right Node is provided to that visitor.
java.lang.Exception
public void testAddMixin() throws java.lang.Exception
Version.addMixin(String)
throws a ConstraintViolationException
java.lang.Exception
public void testAddNode() throws java.lang.Exception
Version.addNode(String)
and
Version.addNode(String, String)
throw a ConstraintViolationException
java.lang.Exception
public void testCanAddMixin() throws java.lang.Exception
Version.canAddMixin(String)
returns
false
java.lang.Exception
public void testCancelMerge() throws java.lang.Exception
Version.cancelMerge(Version)
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testCancelMergeJcr2() throws java.lang.Exception
Version.cancelMerge(Version)
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testCheckin() throws java.lang.Exception
Version.checkin()
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testCheckinJcr2() throws java.lang.Exception
Version.checkin()
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testCheckout() throws java.lang.Exception
Version.checkout()
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testCheckoutJcr2() throws java.lang.Exception
Version.checkout()
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testDoneMerge() throws java.lang.Exception
Version.doneMerge(Version)
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testDoneMergeJcr2() throws java.lang.Exception
Version.doneMerge(Version)
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testGetAncestor() throws java.lang.Exception
Version.getAncestor(int)
returns the right
ancestor
java.lang.Exception
public void testGetBaseVersion() throws java.lang.Exception
Version.getBaseVersion()
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testGetBaseVersionJcr2() throws java.lang.Exception
Version.getBaseVersion()
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testGetCorrespondingNodePath() throws java.lang.Exception
Version.getCorrespondingNodePath(String)
returns
the right path
java.lang.Exception
public void testGetDepth() throws java.lang.Exception
Version.getDepth()
returns the right depth
java.lang.Exception
public void testGetIndex() throws java.lang.Exception
Version.getIndex()
returns the right index
java.lang.Exception
public void testGetLock() throws java.lang.Exception
Version.getLock()
throws a LockException
java.lang.Exception
public void testGetLockJcr2() throws java.lang.Exception
Version.getLock()
throws a LockException
java.lang.Exception
public void testGetMixinNodeTypes() throws java.lang.Exception
Version.getMixinNodeTypes()
does not return null.
java.lang.Exception
public void testGetName() throws java.lang.Exception
Version.getName()
returns the right name
java.lang.Exception
public void testGetNode() throws java.lang.Exception
Version.getNode(String)
returns the right child
Node
java.lang.Exception
public void testGetNodes() throws java.lang.Exception
Version.getNodes()
and Version.getNodes(String)
returns the right child Node
java.lang.Exception
public void testGetParent() throws java.lang.Exception
Version.getParent()
returns the right parent Node
java.lang.Exception
public void testGetPath() throws java.lang.Exception
Version.getPath()
returns the right path
java.lang.Exception
public void testGetPrimaryItem() throws java.lang.Exception
Version.getPrimaryItem()
throws a ItemNotFoundException
java.lang.Exception
public void testGetPrimaryNodeType() throws java.lang.Exception
Version.getPrimaryNodeType()
returns the right
primary node type nt:version
java.lang.Exception
public void testGetProperties() throws java.lang.Exception
Version.getProperties()
and
Version.getProperties(String)
return the right property
java.lang.Exception
public void testGetProperty() throws java.lang.Exception
Version.getProperty(String)
returns the right
property
java.lang.Exception
public void testGetSession() throws java.lang.Exception
Version.getSession()
returns the right session
java.lang.Exception
public void testGetVersionHistory() throws java.lang.Exception
Version.getVersionHistory()
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testGetVersionHistoryJcr2() throws java.lang.Exception
Version.getVersionHistory()
throws an UnsupportedRepositoryOperationException
java.lang.Exception
public void testGetUUID() throws java.lang.Exception
Version.getUUID()
returns the right UUID
java.lang.Exception
public void testHasNode() throws java.lang.Exception
Version.hasNode(String)
returns the right
boolean
value
java.lang.Exception
public void testHasNodes() throws java.lang.Exception
Version.hasNodes()
returns true
java.lang.Exception
public void testHasProperties() throws java.lang.Exception
Version.hasProperties()
returns true
java.lang.Exception
public void testHasProperty() throws java.lang.Exception
Version.hasProperty(String)
returns the right
boolean
value
java.lang.Exception
public void testHoldsLock() throws java.lang.Exception
Version.holdsLock()
returns false
java.lang.Exception
public void testHoldsLockJcr2() throws java.lang.Exception
Version.holdsLock()
returns false
java.lang.Exception
public void testIsCheckedOut() throws java.lang.Exception
Version.isCheckedOut()
returns true
java.lang.Exception
public void testIsCheckedOutJcr2() throws java.lang.Exception
Version.isCheckedOut()
returns true
java.lang.Exception
public void testIsLocked() throws java.lang.Exception
Version.isLocked()
returns false
java.lang.Exception
public void testIsLockedJcr2() throws java.lang.Exception
Version.isLocked()
returns false
java.lang.Exception
public void testIsModified() throws java.lang.Exception
Version.isModified()
returns false
java.lang.Exception
public void testIsNew() throws java.lang.Exception
Version.isNew()
returns false
java.lang.Exception
public void testIsNode() throws java.lang.Exception
Version.isNode()
returns true
java.lang.Exception
public void testIsNodeType() throws java.lang.Exception
Version.isNodeType(String)
returns the right
boolean
value
java.lang.Exception
public void testIsSame() throws java.lang.Exception
Version.isSame()
returns the right
boolean
value
java.lang.Exception
public void testIsSameJcr2() throws java.lang.Exception
Version.isSame()
returns the right
boolean
value
java.lang.Exception
public void testLock() throws java.lang.Exception
Version.lock(boolean, boolean)
throws a LockException
java.lang.Exception
public void testLockJcr2() throws java.lang.Exception
Version.lock(boolean, boolean)
throws a LockException
java.lang.Exception
public void testMerge() throws java.lang.Exception
Version.merge(String)
throws an
ConstraintViolationException
java.lang.Exception
public void testOrderBefore() throws java.lang.Exception
Version.orderBefore(String, String)
throws an
UnsupportedRepositoryOperationException
java.lang.Exception
public void testRefresh() throws java.lang.Exception
Version.refresh(boolean)
works as expected (do
nothing and return quietly)
java.lang.Exception
public void testRemove() throws java.lang.Exception
Version.remove()
throws an ConstraintViolationException
java.lang.Exception
public void testRemoveMixin() throws java.lang.Exception
Version.removeMixin(String)
throws an ConstraintViolationException
java.lang.Exception
public void testRestore() throws java.lang.Exception
Version.restore(String, boolean)
and
Version.restore(Version, boolean)
throw an
UnsupportedRepositoryOperationException
and
Version.restore(Version, String, boolean)
throws a
ConstraintViolationException
.
java.lang.Exception
public void testRestoreJcr2() throws java.lang.Exception
Version.restore(String, boolean)
and
Version.restore(Version, boolean)
throw an
UnsupportedRepositoryOperationException
and
Version.restore(Version, String, boolean)
throws a
ConstraintViolationException
.
java.lang.Exception
public void testRestoreByLabel() throws java.lang.Exception
Version.restoreByLabel(String, boolean)
throws an
UnsupportedRepositoryOperationException
java.lang.Exception
public void testRestoreByLabelJcr2() throws java.lang.Exception
Version.restoreByLabel(String, boolean)
throws an
UnsupportedRepositoryOperationException
java.lang.Exception
public void testSetProperty() throws java.lang.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
java.lang.Exception
public void testUnlock() throws java.lang.Exception
Version.unlock()
throws a LockException
java.lang.Exception
public void testUnlockJcr2() throws java.lang.Exception
Version.unlock()
throws a LockException
java.lang.Exception
public void testUpdate() throws java.lang.Exception
VersionHistory.update(String)
throws an
ConstraintViolationException
java.lang.Exception
public void testFrozenUUID() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |