org.apache.jackrabbit.test.api.lock
Class LockTest

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

public class LockTest
extends AbstractJCRTest

LockTest contains the test cases for the lock support in the JCR specification.


Field Summary
 
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, logger
 
Constructor Summary
LockTest()
           
 
Method Summary
 void testAddRemoveLockToken()
          Test lock token functionality
 void testCheckedIn()
          Test if it is possible to lock and unlock a checked-in node.
 void testCheckedInUnlock()
          Tests if a locked, checked-in node can be unlocked
 void testGetLock()
          Test getLock
 void testGetLockOwner()
          Test if getLockOwner() returns the same value as returned by Session.getUserId at the time that the lock was placed
 void testGetLockOwnerProperty()
          Test if getLockOwner() returns the same value as returned by Session.getUserId at the time that the lock was placed
 void testGetNode()
          Test to get the lock holding node of a node
 void testIsDeep()
          Test Lock.isDeep()
 void testIsSessionScoped()
          Test Lock.isSessionScoped()
 void testLockTransfer()
          Test locks may be transferred to other session
 void testLogout()
          Test locks are released when session logs out
 void testMoveLocked()
          Tests if move preserves lock state (JIRA issue JCR-207).
 void testNodeLocked()
          Test session scope: other session may not access nodes that are locked.
 void testOpenScopedLocks()
          Test open-scoped locks
 void testParentChildDeepLock()
          Test parent/child lock
 void testParentChildLock()
          Test parent/child lock
 void testRefresh()
          Test refresh
 void testRefreshNotLive()
          Test refresh
 void testReorder()
          Tests if locks are maintained when child nodes are reordered
 void testReorder2()
          Tests if locks are maintained when child nodes are reordered
 void testShallowLock()
          Test if a shallow lock does not lock the child nodes of the locked node.
 void testUnlockSameNameSibling()
          Tests if unlocking the first of two locked same-name sibling nodes does not unlock the second (JIRA issue JCR-284).
 
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, setUp, tearDown
 
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

LockTest

public LockTest()
Method Detail

testAddRemoveLockToken

public void testAddRemoveLockToken()
                            throws Exception
Test lock token functionality

Throws:
Exception

testNodeLocked

public void testNodeLocked()
                    throws Exception
Test session scope: other session may not access nodes that are locked.

Throws:
Exception

testGetNode

public void testGetNode()
                 throws Exception
Test to get the lock holding node of a node

Throws:
Exception

testGetLockOwnerProperty

public void testGetLockOwnerProperty()
                              throws Exception
Test if getLockOwner() returns the same value as returned by Session.getUserId at the time that the lock was placed

Throws:
Exception

testGetLockOwner

public void testGetLockOwner()
                      throws Exception
Test if getLockOwner() returns the same value as returned by Session.getUserId at the time that the lock was placed

Throws:
Exception

testShallowLock

public void testShallowLock()
                     throws Exception
Test if a shallow lock does not lock the child nodes of the locked node.

Throws:
Exception

testCheckedIn

public void testCheckedIn()
                   throws NotExecutableException,
                          RepositoryException
Test if it is possible to lock and unlock a checked-in node.

Throws:
NotExecutableException
RepositoryException

testParentChildLock

public void testParentChildLock()
                         throws Exception
Test parent/child lock

Throws:
Exception

testParentChildDeepLock

public void testParentChildDeepLock()
                             throws Exception
Test parent/child lock

Throws:
Exception

testIsDeep

public void testIsDeep()
                throws RepositoryException,
                       NotExecutableException
Test Lock.isDeep()

Throws:
RepositoryException
NotExecutableException

testIsSessionScoped

public void testIsSessionScoped()
                         throws RepositoryException,
                                NotExecutableException
Test Lock.isSessionScoped()

Throws:
RepositoryException
NotExecutableException

testLogout

public void testLogout()
                throws Exception
Test locks are released when session logs out

Throws:
Exception

testLockTransfer

public void testLockTransfer()
                      throws Exception
Test locks may be transferred to other session

Throws:
Exception

testOpenScopedLocks

public void testOpenScopedLocks()
                         throws Exception
Test open-scoped locks

Throws:
Exception

testRefresh

public void testRefresh()
                 throws Exception
Test refresh

Throws:
Exception

testRefreshNotLive

public void testRefreshNotLive()
                        throws Exception
Test refresh

Throws:
Exception

testGetLock

public void testGetLock()
                 throws Exception
Test getLock

Throws:
Exception

testCheckedInUnlock

public void testCheckedInUnlock()
                         throws Exception
Tests if a locked, checked-in node can be unlocked

Throws:
Exception

testReorder

public void testReorder()
                 throws Exception
Tests if locks are maintained when child nodes are reordered

Throws:
Exception

testReorder2

public void testReorder2()
                  throws Exception
Tests if locks are maintained when child nodes are reordered

Throws:
Exception

testMoveLocked

public void testMoveLocked()
                    throws Exception
Tests if move preserves lock state (JIRA issue JCR-207). A node that has been locked must still appear locked when it has been moved or renamed, regardless whether the changes have already been made persistent.

Throws:
Exception

testUnlockSameNameSibling

public void testUnlockSameNameSibling()
                               throws RepositoryException,
                                      NotExecutableException
Tests if unlocking the first of two locked same-name sibling nodes does not unlock the second (JIRA issue JCR-284).

Throws:
RepositoryException
NotExecutableException


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