org.apache.jackrabbit.test.api.version.simple
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.simple.AbstractVersionTest
                      extended by org.apache.jackrabbit.test.api.version.simple.RestoreTest
All Implemented Interfaces:
junit.framework.Test

public class RestoreTest
extends AbstractVersionTest

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


Field Summary
 
Fields inherited from class org.apache.jackrabbit.test.api.version.simple.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
RestoreTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testLinearVersions()
          Tests if restore on simple versioning creates a new version that is in the correct linear order.
 void testLinearVersionsJcr2_2()
          Tests if restore on simple versioning creates a new version that is in the correct linear order.
 void testLinearVersionsJcr2_3()
          Tests if restore on simple versioning creates a new version that is in the correct linear order.
 void testLinearVersionsJcr2_4()
          Tests if restore on simple versioning creates a new version that is in the correct linear order.
 void testLinearVersionsJcr2()
          Tests if restore on simple versioning creates a new version that is in the correct linear order.
 void testRestoreChild1()
           
 void testRestoreChild1Jcr2_2()
           
 void testRestoreChild1Jcr2_3()
           
 void testRestoreChild1Jcr2_4()
           
 void testRestoreChild1Jcr2()
           
 void testRestoreCorrectProperty()
          Test if restoring a node restores the correct property
 void testRestoreCorrectPropertyJcr2_2()
          Test if restoring a node restores the correct property
 void testRestoreCorrectPropertyJcr2_3()
          Test if restoring a node restores the correct property
 void testRestoreCorrectPropertyJcr2_4()
          Test if restoring a node restores the correct property
 void testRestoreCorrectPropertyJcr2()
          Test if restoring a node restores the correct property
 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 testRestoreInvalidVersion2Jcr2()
          VersionException expected on Node.restore(String, boolean) if the specified version is not part of this node's version history.
 void testRestoreInvalidVersionJcr2()
          VersionException expected on restore 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 testRestoreLabelJcr2()
          Test the restore of a versionable node using a label.
 void testRestoreName()
          Test the restore of the OPV=Version child nodes.
 void testRestoreNameJcr2()
          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 testRestoreNonVersionableNode3Jcr2_2()
          Test restoring on a non-versionable node.
 void testRestoreNonVersionableNodeJcr2_2()
          Test restoring on a non-versionable node.
 void testRestoreOnCheckedInNode()
          Test if restoring a node works on checked-in node.
 void testRestoreOnCheckedInNodeJcr2_1()
          Test if restoring a node works on checked-in node.
 void testRestoreOnCheckedInNodeJcr2_2()
          Test if restoring a node works on checked-in node.
 void testRestoreOnCheckedInNodeJcr2_3()
          Test if restoring a node works on checked-in node.
 void testRestoreOnCheckedInNodeJcr2_4()
          Test if restoring a node works on checked-in node.
 void testRestoreOnCheckedOutNode()
          Test if restoring a node works on checked-out node.
 void testRestoreOnCheckedOutNodeJcr2_2()
          Test if restoring a node works on checked-out node.
 void testRestoreOnCheckedOutNodeJcr2_3()
          Test if restoring a node works on checked-out node.
 void testRestoreOnCheckedOutNodeJcr2_4()
          Test if restoring a node works on checked-out node.
 void testRestoreOnCheckedOutNodeJcr2()
          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 testRestoreOrder2Jcr2_2()
          Test the child ordering of restored nodes.
 void testRestoreOrder2Jcr2_3()
          Test the child ordering of restored nodes.
 void testRestoreOrder2Jcr2_4()
          Test the child ordering of restored nodes.
 void testRestoreOrder2Jcr2()
          Test the child ordering of restored nodes.
 void testRestoreOrderJcr2_2()
          Test the child ordering of restored nodes.
 void testRestoreOrderJcr2_3()
          Test the child ordering of restored nodes.
 void testRestoreOrderJcr2_4()
          Test the child ordering of restored nodes.
 void testRestoreOrderJcr2()
          Test the child ordering of restored nodes.
 void testRestoreRootVersionFail()
          Test if restoring the root version fails.
 void testRestoreRootVersionFailJcr2()
          Test if restoring the root version fails.
 void testRestoreSetsIsCheckedOutToFalse()
          Restoring a node set the jcr:isCheckedOut property to false.
 void testRestoreSetsIsCheckedOutToFalseJcr2_2()
          Restoring a node set the jcr:isCheckedOut property to false.
 void testRestoreSetsIsCheckedOutToFalseJcr2_4()
          Restoring a node set the jcr:isCheckedOut property to false.
 void testRestoreSetsIsCheckedOutToFalseJcr2()
          Restoring a node set the jcr:isCheckedOut property to false.
 void testRestoreSetsIsCheckedOutToFalseJcr3()
          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 testRestoreWithInvalidVersionJcr2()
          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 testRestoreWithPendingChangesJcr2_2()
          Test if InvalidItemStateException is thrown if the node has pending changes.
 void testRestoreWithPendingChangesJcr2_3()
          Test if InvalidItemStateException is thrown if the node has pending changes.
 void testRestoreWithPendingChangesJcr2_4()
          Test if InvalidItemStateException is thrown if the node has pending changes.
 void testRestoreWithPendingChangesJcr2()
          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.
 void testRestoreWithUUIDConflictJcr2_2()
          Tests if restoring the Version of an existing node throws an ItemExistsException if removeExisting is set to FALSE.
 void testRestoreWithUUIDConflictJcr2_3()
          Tests if restoring the Version of an existing node throws an ItemExistsException if removeExisting is set to FALSE.
 void testRestoreWithUUIDConflictJcr2_4()
          Tests if restoring the Version of an existing node throws an ItemExistsException if removeExisting is set to FALSE.
 void testRestoreWithUUIDConflictJcr2()
          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.simple.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

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 RepositoryException
Test if restoring the root version fails.

Throws:
RepositoryException

testRestoreRootVersionFailJcr2

public void testRestoreRootVersionFailJcr2()
                                    throws RepositoryException
Test if restoring the root version fails.

Throws:
RepositoryException

testRestoreOnCheckedInNode

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

Throws:
RepositoryException

testRestoreOnCheckedInNodeJcr2_1

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

Throws:
RepositoryException

testRestoreOnCheckedInNodeJcr2_2

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

Throws:
RepositoryException

testRestoreOnCheckedInNodeJcr2_3

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

Throws:
RepositoryException

testRestoreOnCheckedInNodeJcr2_4

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

Throws:
RepositoryException

testRestoreOnCheckedOutNode

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

Throws:
RepositoryException

testRestoreOnCheckedOutNodeJcr2

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

Throws:
RepositoryException

testRestoreOnCheckedOutNodeJcr2_2

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

Throws:
RepositoryException

testRestoreOnCheckedOutNodeJcr2_3

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

Throws:
RepositoryException

testRestoreOnCheckedOutNodeJcr2_4

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

Throws:
RepositoryException

testRestoreSetsIsCheckedOutToFalse

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

Throws:
RepositoryException

testRestoreSetsIsCheckedOutToFalseJcr2

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

Throws:
RepositoryException

testRestoreSetsIsCheckedOutToFalseJcr2_2

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

Throws:
RepositoryException

testRestoreSetsIsCheckedOutToFalseJcr3

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

Throws:
RepositoryException

testRestoreSetsIsCheckedOutToFalseJcr2_4

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

Throws:
RepositoryException

testRestoreCorrectProperty

public void testRestoreCorrectProperty()
                                throws RepositoryException
Test if restoring a node restores the correct property

Throws:
RepositoryException

testRestoreCorrectPropertyJcr2

public void testRestoreCorrectPropertyJcr2()
                                    throws RepositoryException
Test if restoring a node restores the correct property

Throws:
RepositoryException

testRestoreCorrectPropertyJcr2_2

public void testRestoreCorrectPropertyJcr2_2()
                                      throws RepositoryException
Test if restoring a node restores the correct property

Throws:
RepositoryException

testRestoreCorrectPropertyJcr2_3

public void testRestoreCorrectPropertyJcr2_3()
                                      throws RepositoryException
Test if restoring a node restores the correct property

Throws:
RepositoryException

testRestoreCorrectPropertyJcr2_4

public void testRestoreCorrectPropertyJcr2_4()
                                      throws RepositoryException
Test if restoring a node restores the correct property

Throws:
RepositoryException

testRestoreWithPendingChanges

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

Throws:
RepositoryException

testRestoreWithPendingChangesJcr2

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

Throws:
RepositoryException

testRestoreWithPendingChangesJcr2_2

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

Throws:
RepositoryException

testRestoreWithPendingChangesJcr2_3

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

Throws:
RepositoryException

testRestoreWithPendingChangesJcr2_4

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

Throws:
RepositoryException

testRestoreInvalidVersion

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

Throws:
RepositoryException

testRestoreInvalidVersionJcr2

public void testRestoreInvalidVersionJcr2()
                                   throws RepositoryException
VersionException expected on restore if the specified version is not part of this node's version history.

Throws:
RepositoryException

testRestoreInvalidVersion2

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

Throws:
RepositoryException

testRestoreInvalidVersion2Jcr2

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

Throws:
RepositoryException

testRestoreNonVersionableNode

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

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

testRestoreNonVersionableNodeJcr2_2

public void testRestoreNonVersionableNodeJcr2_2()
                                         throws RepositoryException
Test restoring on a non-versionable node.

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

testRestoreNonVersionableNode2

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

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

testRestoreNonVersionableNode3

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

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

testRestoreNonVersionableNode3Jcr2_2

public void testRestoreNonVersionableNode3Jcr2_2()
                                          throws RepositoryException
Test restoring on a non-versionable node.

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

testRestoreWithInvalidVersion

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

Throws:
RepositoryException

testRestoreWithInvalidVersionJcr2

public void testRestoreWithInvalidVersionJcr2()
                                       throws RepositoryException
Test if restoring a node with an invalid Version throws a VersionException

Throws:
RepositoryException

testRestoreWithUUIDConflict

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

Throws:
RepositoryException
NotExecutableException

testRestoreWithUUIDConflictJcr2

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

Throws:
RepositoryException
NotExecutableException

testRestoreWithUUIDConflictJcr2_2

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

Throws:
RepositoryException
NotExecutableException

testRestoreWithUUIDConflictJcr2_3

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

Throws:
RepositoryException
NotExecutableException

testRestoreWithUUIDConflictJcr2_4

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

Throws:
RepositoryException
NotExecutableException

testRestoreChild1

public void testRestoreChild1()
                       throws RepositoryException
Throws:
RepositoryException

testRestoreChild1Jcr2

public void testRestoreChild1Jcr2()
                           throws RepositoryException
Throws:
RepositoryException

testRestoreChild1Jcr2_2

public void testRestoreChild1Jcr2_2()
                             throws RepositoryException
Throws:
RepositoryException

testRestoreChild1Jcr2_3

public void testRestoreChild1Jcr2_3()
                             throws RepositoryException
Throws:
RepositoryException

testRestoreChild1Jcr2_4

public void testRestoreChild1Jcr2_4()
                             throws RepositoryException
Throws:
RepositoryException

testRestoreLabel

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

Throws:
RepositoryException

testRestoreLabelJcr2

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

Throws:
RepositoryException

testRestoreName

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

Throws:
RepositoryException
NotExecutableException

testRestoreNameJcr2

public void testRestoreNameJcr2()
                         throws RepositoryException,
                                NotExecutableException
Test the restore of the OPV=Version child nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrder

public void testRestoreOrder()
                      throws RepositoryException,
                             NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrderJcr2

public void testRestoreOrderJcr2()
                          throws RepositoryException,
                                 NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrderJcr2_2

public void testRestoreOrderJcr2_2()
                            throws RepositoryException,
                                   NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrderJcr2_3

public void testRestoreOrderJcr2_3()
                            throws RepositoryException,
                                   NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrderJcr2_4

public void testRestoreOrderJcr2_4()
                            throws RepositoryException,
                                   NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrder2

public void testRestoreOrder2()
                       throws RepositoryException,
                              NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrder2Jcr2

public void testRestoreOrder2Jcr2()
                           throws RepositoryException,
                                  NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrder2Jcr2_2

public void testRestoreOrder2Jcr2_2()
                             throws RepositoryException,
                                    NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrder2Jcr2_3

public void testRestoreOrder2Jcr2_3()
                             throws RepositoryException,
                                    NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testRestoreOrder2Jcr2_4

public void testRestoreOrder2Jcr2_4()
                             throws RepositoryException,
                                    NotExecutableException
Test the child ordering of restored nodes.

Throws:
RepositoryException
NotExecutableException

testLinearVersions

public void testLinearVersions()
                        throws Exception
Tests if restore on simple versioning creates a new version that is in the correct linear order.

Throws:
Exception

testLinearVersionsJcr2

public void testLinearVersionsJcr2()
                            throws Exception
Tests if restore on simple versioning creates a new version that is in the correct linear order.

Throws:
Exception

testLinearVersionsJcr2_2

public void testLinearVersionsJcr2_2()
                              throws Exception
Tests if restore on simple versioning creates a new version that is in the correct linear order.

Throws:
Exception

testLinearVersionsJcr2_3

public void testLinearVersionsJcr2_3()
                              throws Exception
Tests if restore on simple versioning creates a new version that is in the correct linear order.

Throws:
Exception

testLinearVersionsJcr2_4

public void testLinearVersionsJcr2_4()
                              throws Exception
Tests if restore on simple versioning creates a new version that is in the correct linear order.

Throws:
Exception


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.