net.sf.sasl.distributed.lock.impl
Class DefaultLockSessionTest

java.lang.Object
  extended by net.sf.sasl.distributed.lock.impl.DefaultLockSessionTest

public class DefaultLockSessionTest
extends Object

Test cases for the DefaultLockSession class.

Author:
Philipp Förmer

Constructor Summary
DefaultLockSessionTest()
           
 
Method Summary
 void setUp()
           
 void testBeginLockSequence()
          Test cases for the beginLockSequence(String) method.
 void testClear()
          Test cases for the clear() method.
 void testDetach()
          Test cases for the detach(IMutex) method.
 void testGetCurrentLockSequence()
          Test cases for the getCurrentLockSequence() method.
 void testGetLockSessionFactory()
          Test cases for the getLockSessionFactory() method.
 void testGetMutex()
          Test cases for the getMutex(Object) method.
 void testIsActive()
          Test cases for the isActive() and isInvalid() methods.
 void testIsLocalLockHeldByASequenceAndIsLockKeyOwnedByASequence()
          Test cases for the isLocalLockHeldByASequence(Object) and isLockKeyOwnedByASequence(Object) methods.
 void testLock()
          Test cases for the lock(Object).
 void testLockInterruptibly()
          Test cases for the lockInterruptibly(Object) method.
 void testRelease()
          Test cases for the release() method.
 void testSupportesNestedLockSequences()
          Test cases for the supportsNestedLockSequences() method.
 void testThreadCheckForSession()
          Tests if all public vulnerable methods of DefaultLockSession validate if the current thread equals the owner thread, if thread checking is enabled.
 void testTryLockNoArguments()
          Test cases for tryLock(Object) method.
 void testTryLockWithArguments()
          Test cases for tryLock(Object, long, TimeUnit) method.
 void testUnlock()
          Test cases for unlock(Object) method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLockSessionTest

public DefaultLockSessionTest()
Method Detail

setUp

public void setUp()

testGetLockSessionFactory

public void testGetLockSessionFactory()
                               throws Exception
Test cases for the getLockSessionFactory() method.

Throws:
Exception

testSupportesNestedLockSequences

public void testSupportesNestedLockSequences()
                                      throws Exception
Test cases for the supportsNestedLockSequences() method.

Throws:
Exception

testGetCurrentLockSequence

public void testGetCurrentLockSequence()
                                throws Exception
Test cases for the getCurrentLockSequence() method.

Throws:
Exception

testRelease

public void testRelease()
                 throws Exception
Test cases for the release() method.

Throws:
Exception

testBeginLockSequence

public void testBeginLockSequence()
                           throws Exception
Test cases for the beginLockSequence(String) method.

Throws:
Exception

testClear

public void testClear()
               throws Exception
Test cases for the clear() method.

Throws:
Exception

testThreadCheckForSession

public void testThreadCheckForSession()
                               throws Exception
Tests if all public vulnerable methods of DefaultLockSession validate if the current thread equals the owner thread, if thread checking is enabled.

Throws:
Exception

testIsLocalLockHeldByASequenceAndIsLockKeyOwnedByASequence

public void testIsLocalLockHeldByASequenceAndIsLockKeyOwnedByASequence()
                                                                throws Exception
Test cases for the isLocalLockHeldByASequence(Object) and isLockKeyOwnedByASequence(Object) methods.

Throws:
Exception

testIsActive

public void testIsActive()
                  throws Exception
Test cases for the isActive() and isInvalid() methods.

Throws:
Exception

testLock

public void testLock()
              throws Exception
Test cases for the lock(Object).

Throws:
Exception

testTryLockNoArguments

public void testTryLockNoArguments()
                            throws Exception
Test cases for tryLock(Object) method.

Throws:
Exception

testTryLockWithArguments

public void testTryLockWithArguments()
                              throws Exception
Test cases for tryLock(Object, long, TimeUnit) method.

Throws:
Exception

testUnlock

public void testUnlock()
                throws Exception
Test cases for unlock(Object) method.

Throws:
Exception

testLockInterruptibly

public void testLockInterruptibly()
                           throws Exception
Test cases for the lockInterruptibly(Object) method.

Throws:
Exception

testDetach

public void testDetach()
                throws Exception
Test cases for the detach(IMutex) method.

Throws:
Exception

testGetMutex

public void testGetMutex()
                  throws Exception
Test cases for the getMutex(Object) method.

Throws:
Exception


Copyright © 2010. All Rights Reserved.