org.apache.jackrabbit.test.api.version
Class RestoreTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jackrabbit.test.JUnitTest
              extended by org.apache.jackrabbit.test.AbstractJCRTest
                  extended by org.apache.jackrabbit.test.api.version.AbstractVersionTest
                      extended by org.apache.jackrabbit.test.api.version.RestoreTest
All Implemented Interfaces:
junit.framework.Test

public class RestoreTest
extends AbstractVersionTest

RestoreTest covers tests related to the restore methods available on Node:


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
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
RestoreTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testRestoreChild1()
           
 void testRestoreInvalidVersion()
          VersionException expected on Node.restore(Version, boolean) if the specified version is not part of this node's version history.
 void testRestoreInvalidVersion2()
          VersionException expected on Node.restore(String, boolean) if the specified version is not part of this node's version history.
 void testRestoreLabel()
          Test the restore of a versionable node using a label.
 void testRestoreName()
          Test the restore of the OPV=Version child nodes.
 void testRestoreNonVersionableNode()
          Test calling Node.restore(String, boolean) on a non-versionable node.
 void testRestoreNonVersionableNode2()
          Test calling Node.restore(Version, String, boolean) on a non-versionable node.
 void testRestoreNonVersionableNode3()
          Test calling Node.restore(Version, boolean) on a non-versionable node.
 void testRestoreOnCheckedInNode()
          Test if restoring a node works on checked-in node.
 void testRestoreOnCheckedOutNode()
          Test if restoring a node works on checked-out node.
 void testRestoreOrder()
          Test the child ordering of restored nodes.
 void testRestoreOrder2()
          Test the child ordering of restored nodes.
 void testRestoreRootVersionFail()
          Test if restoring the root version fails.
 void testRestoreSetsBaseVersion()
          Test if restoring a node sets the jcr:baseVersion property correctly.
 void testRestoreSetsIsCheckedOutToFalse()
          Restoring a node set the jcr:isCheckedOut property to false.
 void testRestoreWithInvalidVersion()
          Test if restoring a node with an invalid Version throws a VersionException
 void testRestoreWithPendingChanges()
          Test if InvalidItemStateException is thrown if the node has pending changes.
 void testRestoreWithUUIDConflict()
          Tests if restoring the Version of an existing node throws an ItemExistsException if removeExisting is set to FALSE.
 
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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RestoreTest

public RestoreTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class AbstractVersionTest
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class AbstractVersionTest
Throws:
Exception

testRestoreRootVersionFail

public void testRestoreRootVersionFail()
                                throws javax.jcr.RepositoryException
Test if restoring the root version fails.

Throws:
javax.jcr.RepositoryException

testRestoreOnCheckedInNode

public void testRestoreOnCheckedInNode()
                                throws javax.jcr.RepositoryException
Test if restoring a node works on checked-in node.

Throws:
javax.jcr.RepositoryException

testRestoreOnCheckedOutNode

public void testRestoreOnCheckedOutNode()
                                 throws javax.jcr.RepositoryException
Test if restoring a node works on checked-out node.

Throws:
javax.jcr.RepositoryException

testRestoreSetsIsCheckedOutToFalse

public void testRestoreSetsIsCheckedOutToFalse()
                                        throws javax.jcr.RepositoryException
Restoring a node set the jcr:isCheckedOut property to false.

Throws:
javax.jcr.RepositoryException

testRestoreSetsBaseVersion

public void testRestoreSetsBaseVersion()
                                throws javax.jcr.RepositoryException
Test if restoring a node sets the jcr:baseVersion property correctly.

Throws:
javax.jcr.RepositoryException

testRestoreWithPendingChanges

public void testRestoreWithPendingChanges()
                                   throws javax.jcr.RepositoryException
Test if InvalidItemStateException is thrown if the node has pending changes.

Throws:
javax.jcr.RepositoryException

testRestoreInvalidVersion

public void testRestoreInvalidVersion()
                               throws javax.jcr.RepositoryException
VersionException expected on Node.restore(Version, boolean) if the specified version is not part of this node's version history.

Throws:
javax.jcr.RepositoryException

testRestoreInvalidVersion2

public void testRestoreInvalidVersion2()
                                throws javax.jcr.RepositoryException
VersionException expected on Node.restore(String, boolean) if the specified version is not part of this node's version history.

Throws:
javax.jcr.RepositoryException

testRestoreNonVersionableNode

public void testRestoreNonVersionableNode()
                                   throws javax.jcr.RepositoryException
Test calling Node.restore(String, boolean) on a non-versionable node.

Throws:
javax.jcr.RepositoryException
See Also:
Node.restore(String, boolean)

testRestoreNonVersionableNode2

public void testRestoreNonVersionableNode2()
                                    throws javax.jcr.RepositoryException
Test calling Node.restore(Version, String, boolean) on a non-versionable node.

Throws:
javax.jcr.RepositoryException
See Also:
Node.restore(javax.jcr.version.Version, String, boolean)

testRestoreNonVersionableNode3

public void testRestoreNonVersionableNode3()
                                    throws javax.jcr.RepositoryException
Test calling Node.restore(Version, boolean) on a non-versionable node.

Throws:
javax.jcr.RepositoryException
See Also:
Node.restore(Version, boolean)

testRestoreWithInvalidVersion

public void testRestoreWithInvalidVersion()
                                   throws javax.jcr.RepositoryException
Test if restoring a node with an invalid Version throws a VersionException

Throws:
javax.jcr.RepositoryException

testRestoreWithUUIDConflict

public void testRestoreWithUUIDConflict()
                                 throws javax.jcr.RepositoryException,
                                        NotExecutableException
Tests if restoring the Version of an existing node throws an ItemExistsException if removeExisting is set to FALSE.

Throws:
javax.jcr.RepositoryException
NotExecutableException

testRestoreChild1

public void testRestoreChild1()
                       throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

testRestoreLabel

public void testRestoreLabel()
                      throws javax.jcr.RepositoryException
Test the restore of a versionable node using a label.

Throws:
javax.jcr.RepositoryException

testRestoreName

public void testRestoreName()
                     throws javax.jcr.RepositoryException
Test the restore of the OPV=Version child nodes.

Throws:
javax.jcr.RepositoryException

testRestoreOrder

public void testRestoreOrder()
                      throws javax.jcr.RepositoryException
Test the child ordering of restored nodes.

Throws:
javax.jcr.RepositoryException

testRestoreOrder2

public void testRestoreOrder2()
                       throws javax.jcr.RepositoryException
Test the child ordering of restored nodes.

Throws:
javax.jcr.RepositoryException


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.