org.objectweb.jonas.jtests.clients.transaction
Class A_TxAttribute

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.objectweb.jonas.jtests.util.JTestCase
                    |
                    +--org.objectweb.jonas.jtests.clients.transaction.A_TxAttribute
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
A_TxAttributeEntity, A_TxAttrSession

public abstract class A_TxAttribute
extends JTestCase

Transactional attribute test cases common for all type of beans (Entity/Session)

Author:
Ph.Coq, Ph.Durieux

Fields inherited from class org.objectweb.jonas.jtests.util.JTestCase
ictx, isInit, jonasName, msgerror, testtorun, utx
 
Constructor Summary
A_TxAttribute(java.lang.String name)
           
 
Method Summary
abstract  Simple getSimple(int i)
           
 void testMandatory()
          Test of Mandatory attribute A business method with Mandatory is called outside TX this method returns if the thread is associated to a transaction A javax.transaction.TransactionRequiredException must be received
 void testMandatoryTx()
          Test of Mandatory attribute A business method with Mandatory is called inside TX this method returns if the thread is associated to a transaction the expected value is true
 void testNever()
          Test of Never attribute A business method with Never is called outside TX this method returns if the thread is associated to a transaction the expected value is false
 void testNeverTx()
          Test of Never attribute A business method with Mandatory is called inside TX this method returns if the thread is associated to a transaction A java.rmi.RemoteException must be received
 void testNotSupported()
          Test of NotSupported attribute A business method with NotSupported is called outside TX this method returns if the thread is associated to a transaction the expected value is false
 void testNotSupportedTx()
          Test of NotSupported attribute A business method with NotSupported is called inside TX this method returns if the thread is associated to a transaction the expected value is false
 void testNoTx()
          Test the sequence of several calls to methods with different transactional contexts
 void testRequired()
          Test of Required attribute A business method with Required is called outside TX this method returns if the thread is associated to a transaction the expected value is true
 void testRequiredRequiresNew()
          Test a "Required" method calling a "Requires_new" method. the expected value is true
 void testRequiredRequiresNew2()
          Test a "Required" method calling a "Requires_new" method on another bean instance. the expected value is true
 void testRequiredTx()
          Test of Required attribute A business method with Required is called inside TX this method returns if the thread is associated to a transaction the expected value is true
 void testRequiresNew()
          Test of RequiresNew attribute A business method with RequiresNew is called outside TX this method returns if the thread is associated to a transaction the expected value is true
 void testRequiresNewTx()
          Test of RequiresNew attribute A business method with RequiresNew is called inside TX this method returns if the thread is associated to a transaction the expected value is true
 void testSupports()
          Test of Supports attribute A business method with Supports is called outside TX this method returns if the thread is associated to a transaction the expected value is false
 void testSupportsTx()
          Test of Supports attribute A business method with Supports is called inside TX this method returns if the thread is associated to a transaction the expected value is true
 
Methods inherited from class org.objectweb.jonas.jtests.util.JTestCase
debug, getDBEnv, random, setUp, sleep, tearDown, testEmpty, unloadBeans, useBeans
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, 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

A_TxAttribute

public A_TxAttribute(java.lang.String name)
Method Detail

getSimple

public abstract Simple getSimple(int i)
                          throws java.lang.Exception

testNotSupported

public void testNotSupported()
                      throws java.lang.Exception
Test of NotSupported attribute A business method with NotSupported is called outside TX this method returns if the thread is associated to a transaction the expected value is false

testRequiresNew

public void testRequiresNew()
                     throws java.lang.Exception
Test of RequiresNew attribute A business method with RequiresNew is called outside TX this method returns if the thread is associated to a transaction the expected value is true

testRequired

public void testRequired()
                  throws java.lang.Exception
Test of Required attribute A business method with Required is called outside TX this method returns if the thread is associated to a transaction the expected value is true

testRequiredRequiresNew

public void testRequiredRequiresNew()
                             throws java.lang.Exception
Test a "Required" method calling a "Requires_new" method. the expected value is true

testRequiredRequiresNew2

public void testRequiredRequiresNew2()
                              throws java.lang.Exception
Test a "Required" method calling a "Requires_new" method on another bean instance. the expected value is true

testMandatory

public void testMandatory()
                   throws java.lang.Exception
Test of Mandatory attribute A business method with Mandatory is called outside TX this method returns if the thread is associated to a transaction A javax.transaction.TransactionRequiredException must be received

testNever

public void testNever()
               throws java.lang.Exception
Test of Never attribute A business method with Never is called outside TX this method returns if the thread is associated to a transaction the expected value is false

testSupports

public void testSupports()
                  throws java.lang.Exception
Test of Supports attribute A business method with Supports is called outside TX this method returns if the thread is associated to a transaction the expected value is false

testNotSupportedTx

public void testNotSupportedTx()
                        throws java.lang.Exception
Test of NotSupported attribute A business method with NotSupported is called inside TX this method returns if the thread is associated to a transaction the expected value is false

testRequiresNewTx

public void testRequiresNewTx()
                       throws java.lang.Exception
Test of RequiresNew attribute A business method with RequiresNew is called inside TX this method returns if the thread is associated to a transaction the expected value is true

testRequiredTx

public void testRequiredTx()
                    throws java.lang.Exception
Test of Required attribute A business method with Required is called inside TX this method returns if the thread is associated to a transaction the expected value is true

testMandatoryTx

public void testMandatoryTx()
                     throws java.lang.Exception
Test of Mandatory attribute A business method with Mandatory is called inside TX this method returns if the thread is associated to a transaction the expected value is true

testNeverTx

public void testNeverTx()
                 throws java.lang.Exception
Test of Never attribute A business method with Mandatory is called inside TX this method returns if the thread is associated to a transaction A java.rmi.RemoteException must be received

testSupportsTx

public void testSupportsTx()
                    throws java.lang.Exception
Test of Supports attribute A business method with Supports is called inside TX this method returns if the thread is associated to a transaction the expected value is true

testNoTx

public void testNoTx()
              throws java.lang.Exception
Test the sequence of several calls to methods with different transactional contexts