Class CheckinTest
- 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.CheckinTest
-
- All Implemented Interfaces:
junit.framework.Test
public class CheckinTest extends AbstractVersionTest
CheckinTestcovers tests related toNode.checkin().
-
-
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, mixTitle, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntActivity, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testNodeTypeTestRoot, testPath, testRoot, testRootNode, vf, workspaceName
-
-
Constructor Summary
Constructors Constructor Description CheckinTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetUp()voidtestBaseVersionAfterCheckin()Test if versionable node N's jcr:baseVersion property is set to refer to the new version after checkin.voidtestBaseVersionAfterCheckinJcr2()Test if versionable node N's jcr:baseVersion property is set to refer to the new version after checkin.voidtestCheckinCreatesNewVersion()Test if Node.checkin() adds another version to the VersionHistoryvoidtestCheckinCreatesNewVersionJcr2()Test if VersionManager.checkin(String) adds another version to the VersionHistoryvoidtestCheckinNonVersionableNode()Test calling Node.checkin() on a non-versionable node.voidtestCheckinNonVersionableNodeJcr2()Test calling VersionManager.checkin(P) with the path P resolving to a non-versionable node.voidtestCheckinRemovesPredecessorProperty()Test if the node's jcr:predecessors property contains an empty value array after checkin.voidtestCheckinRemovesPredecessorPropertyJcr2()Test if the node's jcr:predecessors property contains an empty value array after checkin.voidtestCheckinWithPendingChanges()Test if Node.checkin() throws InvalidItemStateException if the node has unsaved changes pending.voidtestCheckinWithPendingChangesJcr2()Test if VersionManager.checkin(P) throws InvalidItemStateException if the path P resolves to a node that has unsaved changes pending.voidtestIsCheckedOut()Test if Node.isCheckedOut() return false after calling Node.checkin()voidtestIsCheckedOutJcr2()Test if VersionManager.isCheckedOut(P) returns false if P is the absolute path of a checked-in versionable node.voidtestIsNotCheckedOut()Test if Node.isCheckedOut() returns false after Node.checkin().voidtestIsNotCheckedOutJcr2()Test if VersionManager.isCheckedOut(P) returns false after calling VersionManager.checkin(P).voidtestMultipleCheckinHasNoEffect()Test if Node.checkin() on a checked-in node has no effect.voidtestMultipleCheckinHasNoEffectJcr2()Test if VersionManager.checkin(P) has no effect if the path P resolves to a checked-in node.voidtestPredecessorIsCopiedToNewVersion()Test if the nodes jcr:predecessors property is copied to the new version on Node.checkin().voidtestPredecessorIsCopiedToNewVersionJcr2()Test if the nodes jcr:predecessors property is copied to the new version on checkin.-
Methods inherited from class org.apache.jackrabbit.test.api.version.AbstractVersionTest
createVersionableNode, getNumberOfVersions, tearDown
-
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, run
-
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, runBare, runTest, setName, toString
-
-
-
-
Method Detail
-
setUp
protected void setUp() throws Exception- Overrides:
setUpin classAbstractVersionTest- Throws:
Exception
-
testIsCheckedOut
public void testIsCheckedOut() throws RepositoryExceptionTest if Node.isCheckedOut() return false after calling Node.checkin()- Throws:
RepositoryException
-
testIsCheckedOutJcr2
public void testIsCheckedOutJcr2() throws RepositoryExceptionTest if VersionManager.isCheckedOut(P) returns false if P is the absolute path of a checked-in versionable node.- Throws:
RepositoryException
-
testCheckinRemovesPredecessorProperty
public void testCheckinRemovesPredecessorProperty() throws RepositoryExceptionTest if the node's jcr:predecessors property contains an empty value array after checkin.- Throws:
RepositoryException
-
testCheckinRemovesPredecessorPropertyJcr2
public void testCheckinRemovesPredecessorPropertyJcr2() throws RepositoryExceptionTest if the node's jcr:predecessors property contains an empty value array after checkin.- Throws:
RepositoryException
-
testPredecessorIsCopiedToNewVersion
public void testPredecessorIsCopiedToNewVersion() throws RepositoryExceptionTest if the nodes jcr:predecessors property is copied to the new version on Node.checkin().- Throws:
RepositoryException
-
testPredecessorIsCopiedToNewVersionJcr2
public void testPredecessorIsCopiedToNewVersionJcr2() throws RepositoryExceptionTest if the nodes jcr:predecessors property is copied to the new version on checkin.- Throws:
RepositoryException
-
testMultipleCheckinHasNoEffect
public void testMultipleCheckinHasNoEffect() throws RepositoryExceptionTest if Node.checkin() on a checked-in node has no effect.- Throws:
RepositoryException
-
testMultipleCheckinHasNoEffectJcr2
public void testMultipleCheckinHasNoEffectJcr2() throws RepositoryExceptionTest if VersionManager.checkin(P) has no effect if the path P resolves to a checked-in node.- Throws:
RepositoryException
-
testBaseVersionAfterCheckin
public void testBaseVersionAfterCheckin() throws RepositoryExceptionTest if versionable node N's jcr:baseVersion property is set to refer to the new version after checkin.- Throws:
RepositoryException
-
testBaseVersionAfterCheckinJcr2
public void testBaseVersionAfterCheckinJcr2() throws RepositoryExceptionTest if versionable node N's jcr:baseVersion property is set to refer to the new version after checkin.- Throws:
RepositoryException
-
testCheckinWithPendingChanges
public void testCheckinWithPendingChanges() throws RepositoryExceptionTest if Node.checkin() throws InvalidItemStateException if the node has unsaved changes pending.- Throws:
RepositoryException
-
testCheckinWithPendingChangesJcr2
public void testCheckinWithPendingChangesJcr2() throws RepositoryExceptionTest 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 RepositoryExceptionTest if Node.isCheckedOut() returns false after Node.checkin().- Throws:
RepositoryException
-
testIsNotCheckedOutJcr2
public void testIsNotCheckedOutJcr2() throws RepositoryExceptionTest if VersionManager.isCheckedOut(P) returns false after calling VersionManager.checkin(P).- Throws:
RepositoryException
-
testCheckinCreatesNewVersion
public void testCheckinCreatesNewVersion() throws RepositoryExceptionTest if Node.checkin() adds another version to the VersionHistory- Throws:
RepositoryException
-
testCheckinCreatesNewVersionJcr2
public void testCheckinCreatesNewVersionJcr2() throws RepositoryExceptionTest if VersionManager.checkin(String) adds another version to the VersionHistory- Throws:
RepositoryException
-
testCheckinNonVersionableNode
public void testCheckinNonVersionableNode() throws RepositoryExceptionTest calling Node.checkin() on a non-versionable node.- Throws:
RepositoryException
-
testCheckinNonVersionableNodeJcr2
public void testCheckinNonVersionableNodeJcr2() throws RepositoryExceptionTest calling VersionManager.checkin(P) with the path P resolving to a non-versionable node.- Throws:
RepositoryException
-
-