org.apache.jackrabbit.test.api.version.simple
Class CheckinTest

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.CheckinTest
All Implemented Interfaces:
junit.framework.Test

public class CheckinTest
extends AbstractVersionTest

CheckinTest covers tests related to Node.checkin() on simple versionable nodes.


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
CheckinTest()
           
 
Method Summary
protected  void setUp()
           
 void testCheckinCreatesNewVersion()
          Test if Node.checkin() adds another version to the VersionHistory
 void testCheckinCreatesNewVersionJcr2()
          Test if VersionManager.checkin(String) adds another version to the VersionHistory
 void testCheckinNonVersionableNode()
          Test calling Node.checkin() on a non-versionable node.
 void testCheckinNonVersionableNodeJcr2()
          Test calling VersionManager.checkin(P) with the path P resolving to a non-versionable node.
 void testCheckinWithPendingChanges()
          Test if Node.checkin() throws InvalidItemStateException if the node has unsaved changes pending.
 void testCheckinWithPendingChangesJcr2()
          Test if VersionManager.checkin(P) throws InvalidItemStateException if the path P resolves to a node that has unsaved changes pending.
 void testIsCheckedOut()
          Test if Node.isCheckedOut() return false after calling Node.checkin()
 void testIsCheckedOutJcr2()
          Test if VersionManager.isCheckedOut(P) returns false if P is the absolute path of a checked-in versionable node.
 void testIsNotCheckedOut()
          Test if Node.isCheckedOut() returns false after Node.checkin().
 void testIsNotCheckedOutJcr2()
          Test if VersionManager.isCheckedOut(P) returns false after calling VersionManager.checkin(P).
 void testMultipleCheckinHasNoEffect()
          Test if Node.checkin() on a checked-in node has no effect.
 void testMultipleCheckinHasNoEffectJcr2()
          Test if VersionManager.checkin(P) has no effect if the path P resolves to a checked-in node.
 
Methods inherited from class org.apache.jackrabbit.test.api.version.simple.AbstractVersionTest
createVersionableNode, getNumberOfVersions, tearDown
 
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

CheckinTest

public CheckinTest()
Method Detail

setUp

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

testIsCheckedOut

public void testIsCheckedOut()
                      throws RepositoryException
Test if Node.isCheckedOut() return false after calling Node.checkin()

Throws:
RepositoryException

testIsCheckedOutJcr2

public void testIsCheckedOutJcr2()
                          throws RepositoryException
Test if VersionManager.isCheckedOut(P) returns false if P is the absolute path of a checked-in versionable node.

Throws:
RepositoryException

testMultipleCheckinHasNoEffect

public void testMultipleCheckinHasNoEffect()
                                    throws RepositoryException
Test if Node.checkin() on a checked-in node has no effect.

Throws:
RepositoryException

testMultipleCheckinHasNoEffectJcr2

public void testMultipleCheckinHasNoEffectJcr2()
                                        throws RepositoryException
Test if VersionManager.checkin(P) has no effect if the path P resolves to a checked-in node.

Throws:
RepositoryException

testCheckinWithPendingChanges

public void testCheckinWithPendingChanges()
                                   throws RepositoryException
Test if Node.checkin() throws InvalidItemStateException if the node has unsaved changes pending.

Throws:
RepositoryException

testCheckinWithPendingChangesJcr2

public void testCheckinWithPendingChangesJcr2()
                                       throws RepositoryException
Test if VersionManager.checkin(P) throws InvalidItemStateException if the path P resolves to a node that has unsaved changes pending.

Throws:
RepositoryException

testIsNotCheckedOut

public void testIsNotCheckedOut()
                         throws RepositoryException
Test if Node.isCheckedOut() returns false after Node.checkin().

Throws:
RepositoryException

testIsNotCheckedOutJcr2

public void testIsNotCheckedOutJcr2()
                             throws RepositoryException
Test if VersionManager.isCheckedOut(P) returns false after calling VersionManager.checkin(P).

Throws:
RepositoryException

testCheckinCreatesNewVersion

public void testCheckinCreatesNewVersion()
                                  throws RepositoryException
Test if Node.checkin() adds another version to the VersionHistory

Throws:
RepositoryException

testCheckinCreatesNewVersionJcr2

public void testCheckinCreatesNewVersionJcr2()
                                      throws RepositoryException
Test if VersionManager.checkin(String) adds another version to the VersionHistory

Throws:
RepositoryException

testCheckinNonVersionableNode

public void testCheckinNonVersionableNode()
                                   throws RepositoryException
Test calling Node.checkin() on a non-versionable node.

Throws:
RepositoryException

testCheckinNonVersionableNodeJcr2

public void testCheckinNonVersionableNodeJcr2()
                                       throws RepositoryException
Test calling VersionManager.checkin(P) with the path P resolving to a non-versionable node.

Throws:
RepositoryException


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