org.objectweb.jonas.jtests.clients.entity
Class F_Relation_mouEC2

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.objectweb.jonas.jtests.util.JTestCase
                    |
                    +--org.objectweb.jonas.jtests.clients.entity.A_Relation
                          |
                          +--org.objectweb.jonas.jtests.clients.entity.F_Relation_mouEC2
All Implemented Interfaces:
junit.framework.Test

public class F_Relation_mouEC2
extends A_Relation

For testing many-to-one unidirectional relationships

Author:
S.Chassande-Barrioz, J. Camilleri This is an advanced test suite for home interface on entity bean CMP2.

Field Summary
protected static AHomeRemote ahome
           
protected static BHomeRemote bhome
           
 
Fields inherited from class org.objectweb.jonas.jtests.util.JTestCase
ictx, isInit, jonasName, msgerror, testtorun, utx
 
Constructor Summary
F_Relation_mouEC2(java.lang.String name)
           
 
Method Summary
 void _testBasicGet(int tx)
          Check that a1.retrieveB()=b0
 void _testBasicGetEmpty(int tx)
          Check that the bean 'a3' has no relation.
 void _testBasicSet(int tx)
          See §10.3.7.5 : a1j.assignB(a2k.retrieveB()) => a2=a1j.retrieveB()
 void _testBasicSetEmpty(int tx)
          Ckeck the new relation a3-b1
 void _testBasicSetNull(int tx)
          Check that a1.assignB(null) => a1.retreiveB()=null
 void _testCohBeanRemoveB(int tx)
          Test of coherence b0.remove() => a0.retrieveB()=null && a1.retrieveB()=null && a2.retrieveB()=null Same as _testCohRemove except that the called remove method is on the bean instead of the home.
 void _testCohRemoveA(int tx)
          Test of coherence a0.remove()
 void _testCohRemoveB(int tx)
          Test of coherence b0.remove()
static void main(java.lang.String[] args)
           
protected  void setUp()
          common setUp routine, used for every test.
static junit.framework.Test suite()
           
 void testBasicGetEmptyTxCall()
           
 void testBasicGetEmptyTxCont()
           
 void testBasicGetEmptyTxNo()
           
 void testBasicGetEmptyTxRb()
           
 void testBasicGetTxCall()
           
 void testBasicGetTxCont()
           
 void testBasicGetTxNo()
           
 void testBasicGetTxRb()
           
 void testBasicSetEmptyTxCall()
           
 void testBasicSetEmptyTxCont()
           
 void testBasicSetEmptyTxNo()
           
 void testBasicSetEmptyTxRb()
           
 void testBasicSetNullTxCall()
           
 void testBasicSetNullTxCont()
           
 void testBasicSetNullTxNo()
           
 void testBasicSetNullTxRb()
           
 void testBasicSetTxCall()
           
 void testBasicSetTxCont()
           
 void testBasicSetTxNo()
           
 void testBasicSetTxRb()
           
 void testCohBeanRemoveBTxCall()
           
 void testCohBeanRemoveBTxNo()
           
 void testCohBeanRemoveBTxRb()
           
 void testCohRemove2()
           
 void testCohRemoveATxCall()
           
 void testCohRemoveATxNo()
           
 void testCohRemoveATxRb()
           
 void testCohRemoveBTxCall()
           
 void testCohRemoveBTxNo()
           
 void testCohRemoveBTxRb()
           
 void testInstanceReuse1()
          Test that the instances in the pool are correctly reused.
 void testInstanceReuse2()
          Test that the instances in the pool are correctly reused.
 
Methods inherited from class org.objectweb.jonas.jtests.clients.entity.A_Relation
getIntAfterDash, getStringBeforeDash
 
Methods inherited from class org.objectweb.jonas.jtests.util.JTestCase
debug, getDBEnv, random, 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
 

Field Detail

ahome

protected static AHomeRemote ahome

bhome

protected static BHomeRemote bhome
Constructor Detail

F_Relation_mouEC2

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

setUp

protected void setUp()
Description copied from class: JTestCase
common setUp routine, used for every test.
Overrides:
setUp in class JTestCase

_testBasicGetEmpty

public void _testBasicGetEmpty(int tx)
                        throws java.lang.Exception
Check that the bean 'a3' has no relation.

testBasicGetEmptyTxNo

public void testBasicGetEmptyTxNo()
                           throws java.lang.Exception

testBasicGetEmptyTxCall

public void testBasicGetEmptyTxCall()
                             throws java.lang.Exception

testBasicGetEmptyTxCont

public void testBasicGetEmptyTxCont()
                             throws java.lang.Exception

testBasicGetEmptyTxRb

public void testBasicGetEmptyTxRb()
                           throws java.lang.Exception

_testBasicSetEmpty

public void _testBasicSetEmpty(int tx)
                        throws java.lang.Exception
Ckeck the new relation a3-b1

testBasicSetEmptyTxNo

public void testBasicSetEmptyTxNo()
                           throws java.lang.Exception

testBasicSetEmptyTxCall

public void testBasicSetEmptyTxCall()
                             throws java.lang.Exception

testBasicSetEmptyTxCont

public void testBasicSetEmptyTxCont()
                             throws java.lang.Exception

testBasicSetEmptyTxRb

public void testBasicSetEmptyTxRb()
                           throws java.lang.Exception

_testBasicGet

public void _testBasicGet(int tx)
                   throws java.lang.Exception
Check that a1.retrieveB()=b0

testBasicGetTxNo

public void testBasicGetTxNo()
                      throws java.lang.Exception

testBasicGetTxCall

public void testBasicGetTxCall()
                        throws java.lang.Exception

testBasicGetTxCont

public void testBasicGetTxCont()
                        throws java.lang.Exception

testBasicGetTxRb

public void testBasicGetTxRb()
                      throws java.lang.Exception

_testBasicSetNull

public void _testBasicSetNull(int tx)
                       throws java.lang.Exception
Check that a1.assignB(null) => a1.retreiveB()=null

testBasicSetNullTxNo

public void testBasicSetNullTxNo()
                          throws java.lang.Exception

testBasicSetNullTxCall

public void testBasicSetNullTxCall()
                            throws java.lang.Exception

testBasicSetNullTxCont

public void testBasicSetNullTxCont()
                            throws java.lang.Exception

testBasicSetNullTxRb

public void testBasicSetNullTxRb()
                          throws java.lang.Exception

_testBasicSet

public void _testBasicSet(int tx)
                   throws java.lang.Exception
See §10.3.7.5 : a1j.assignB(a2k.retrieveB()) => a2=a1j.retrieveB()

testBasicSetTxNo

public void testBasicSetTxNo()
                      throws java.lang.Exception

testBasicSetTxCall

public void testBasicSetTxCall()
                        throws java.lang.Exception

testBasicSetTxCont

public void testBasicSetTxCont()
                        throws java.lang.Exception

testBasicSetTxRb

public void testBasicSetTxRb()
                      throws java.lang.Exception

_testCohRemoveA

public void _testCohRemoveA(int tx)
                     throws java.lang.Exception
Test of coherence a0.remove()

testCohRemoveATxNo

public void testCohRemoveATxNo()
                        throws java.lang.Exception

testCohRemoveATxCall

public void testCohRemoveATxCall()
                          throws java.lang.Exception

testCohRemoveATxRb

public void testCohRemoveATxRb()
                        throws java.lang.Exception

_testCohRemoveB

public void _testCohRemoveB(int tx)
                     throws java.lang.Exception
Test of coherence b0.remove()

testCohRemoveBTxNo

public void testCohRemoveBTxNo()
                        throws java.lang.Exception

testCohRemoveBTxCall

public void testCohRemoveBTxCall()
                          throws java.lang.Exception

testCohRemoveBTxRb

public void testCohRemoveBTxRb()
                        throws java.lang.Exception

_testCohBeanRemoveB

public void _testCohBeanRemoveB(int tx)
                         throws java.lang.Exception
Test of coherence b0.remove() => a0.retrieveB()=null && a1.retrieveB()=null && a2.retrieveB()=null Same as _testCohRemove except that the called remove method is on the bean instead of the home.

testCohBeanRemoveBTxNo

public void testCohBeanRemoveBTxNo()
                            throws java.lang.Exception

testCohBeanRemoveBTxCall

public void testCohBeanRemoveBTxCall()
                              throws java.lang.Exception

testCohBeanRemoveBTxRb

public void testCohBeanRemoveBTxRb()
                            throws java.lang.Exception

testCohRemove2

public void testCohRemove2()
                    throws java.lang.Exception

testInstanceReuse1

public void testInstanceReuse1()
                        throws java.lang.Exception
Test that the instances in the pool are correctly reused. There was a bug because PName was not null for GEnClass at create.

testInstanceReuse2

public void testInstanceReuse2()
                        throws java.lang.Exception
Test that the instances in the pool are correctly reused. There was a bug in jonas-3-0-beta0 because GenClass was already initialized at create.

suite

public static junit.framework.Test suite()

main

public static void main(java.lang.String[] args)