|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.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 |
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 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
ancestor
Exception
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 path
Exception
public void testGetDepth() throws Exception
Version.getDepth()
returns the right depth
Exception
public void testGetIndex() throws Exception
Version.getIndex()
returns the right index
Exception
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 name
Exception
public void testGetNode() throws Exception
Version.getNode(String)
returns the right child
Node
Exception
public void testGetNodes() throws Exception
Version.getNodes()
and Version.getNodes(String)
returns the right child Node
Exception
public void testGetParent() throws Exception
Version.getParent()
returns the right parent Node
Exception
public void testGetPath() throws Exception
Version.getPath()
returns the right path
Exception
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 property
Exception
public void testGetProperty() throws Exception
Version.getProperty(String)
returns the right
property
Exception
public void testGetSession() throws Exception
Version.getSession()
returns the right session
Exception
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 UUID
Exception
public void testHasNode() throws Exception
Version.hasNode(String)
returns the right
boolean
value
Exception
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
value
Exception
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
value
Exception
public void testIsSame() throws Exception
Version.isSame()
returns the right
boolean
value
Exception
public void testIsSameJcr2() throws Exception
Version.isSame()
returns the right
boolean
value
Exception
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
public void testFrozenUUID() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |