|
||||||||||
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.RemoveVersionTest
public class RemoveVersionTest
RemoveVersionTest
provides test methods covering VersionHistory.removeVersion(String)
.
Please note, that removing versions is defined to be an optional feature in
the JSR 170 specification. The setup therefore includes a initial removal,
in order to test, whether removing versions is supported.
Field Summary | |
---|---|
protected Version |
version
|
protected Version |
version2
|
protected Node |
versionableNode2
|
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 |
---|
helper, isReadOnly, jcrBaseVersion, jcrCreated, jcrFrozenNode, jcrFrozenUuid, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntBase, ntFrozenNode, ntQuery, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testPath, testRoot, testRootNode, workspaceName |
Fields inherited from class org.apache.jackrabbit.test.JUnitTest |
---|
log |
Constructor Summary | |
---|---|
RemoveVersionTest()
|
Method Summary | |
---|---|
protected void |
setUp()
|
protected void |
tearDown()
|
void |
testReferentialIntegrityException()
Checks if VersionHistory.removeVersion(String)
throws a ReferentialIntegrityException if the named
version is still referenced by another node. |
void |
testRemoveAllBut2()
Checks if all versions but the base and root one can be removed. |
void |
testRemoveBaseVersion()
Checks if all versions by the base and root one can be removed. |
void |
testRemovedInvalid()
Test removed version gets invalid |
void |
testRemoveInvalidVersion()
Test if removing a version from the version history throws a VersionException if the specified version does not exist. |
void |
testRemoveRootVersion()
Checks if all versions by the base and root one can be removed. |
void |
testRemoveVersionAdjustPredecessorSet()
Test if the predecessors of the removed version are made predecessor of its original successor version. |
void |
testRemoveVersionAdjustSucessorSet()
Test if the successors of the removed version are made successors of all predecessors of the the removed version. |
Methods inherited from class org.apache.jackrabbit.test.api.version.AbstractVersionTest |
---|
createVersionableNode, getNumberOfVersions |
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest |
---|
cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureMultipleWorkspacesSupported, getNonExistingWorkspaceName, 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 |
Field Detail |
---|
protected Node versionableNode2
protected Version version
protected Version version2
protected VersionHistory vHistory
Constructor Detail |
---|
public RemoveVersionTest()
Method Detail |
---|
protected void setUp() throws Exception
setUp
in class AbstractVersionTest
Exception
protected void tearDown() throws Exception
tearDown
in class AbstractVersionTest
Exception
public void testRemovedInvalid() throws Exception
Exception
public void testRemoveVersionAdjustPredecessorSet() throws RepositoryException
RepositoryException
public void testRemoveVersionAdjustSucessorSet() throws RepositoryException
RepositoryException
public void testRemoveInvalidVersion() throws RepositoryException, NotExecutableException
RepositoryException
NotExecutableException
public void testReferentialIntegrityException() throws RepositoryException, NotExecutableException
VersionHistory.removeVersion(String)
throws a ReferentialIntegrityException
if the named
version is still referenced by another node.
RepositoryException
NotExecutableException
public void testRemoveAllBut2() throws RepositoryException
RepositoryException
public void testRemoveRootVersion() throws RepositoryException
RepositoryException
public void testRemoveBaseVersion() throws RepositoryException
RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |