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

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

public class F_Relation_mnbEC2
extends A_Relation

For testing many-to-many bidirectional relationships

Author:
S.Chassande-Barrioz, J. Camilleri

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_mnbEC2(java.lang.String name)
           
 
Method Summary
 void _testBasicClear(int tx)
          Ckeck clear function
 void _testBasicGetEmpty(int tx)
          Check that the bean 'a0' has no relation.
 void _testBasicSetEmpty(int tx)
          Ckeck the new relation a0-b0
 void _testCohBeanRemoveA(int tx)
          Test of coherence a2.remove() => b1.retrieveB()=null && b2.retrieveB()=null && b3.retrieveB()=null Same as _testCohRemoveA except that the called remove method is on the bean instead of the home.
 void _testCohBeanRemoveB(int tx)
          Test of coherence b2.remove() => a1.retrieveB()=null && a2.retrieveB()=null && a3.retrieveB()=null Same as _testCohRemoveB except that the called remove method is on the bean instead of the home.
 void _testCohRemoveA(int tx)
          Test of coherence a2.remove() => b1.retrieveB()=null && b2.retrieveB()=null && b3.retrieveB()=null
 void _testCohRemoveB(int tx)
          Test of coherence b2.remove() => a1.retrieveB()=null && a2.retrieveB()=null && a3.retrieveB()=null
 void _testCohRemoveInRel(int tx)
          Remove an element in a relation.
 void _testCoSetFirst(int tx)
          Ckeck the coherence §10.3.7.6: a1.assignB(a3.retrieveB()) => a1.retreiveB().contains("b2") && a1.retreiveB().contains("b3") && a1.retreiveB().contains("b4") && a3.retreiveB().contains("b2") && a3.retreiveB().contains("b3") && a3.retreiveB().contains("b4") && b1.retreiveB().contains("a2") && b2.retreiveB().contains("a1") && b2.retreiveB().contains("a2") && b2.retreiveB().contains("a3") && b3.retreiveB().contains("b4") && b3.retreiveB().contains("a1") && b3.retreiveB().contains("a2") && b3.retreiveB().contains("a3") && b4.retreiveB().contains("a1") && b4.retreiveB().contains("a3") && b4.retreiveB().contains("a4") && b4.retreiveB().contains("a5") &&
 void _testCoSetRemove(int tx)
          Ckeck the coherence §10.3.7.6 : a2.getB().remove(b2) => a2.retreiveB().contains("b1") && a2.retreiveB().contains("b3") && b2.retreiveB().contains("a1") && b2.retreiveB().contains("a3") && !
 void _testCoSetSecond(int tx)
          Ckeck the coherence §10.3.7.6 : a1.getB().add(b3) => a1.retreiveB().contains("b1") && a1.retreiveB().contains("b2") && a1.retreiveB().contains("b3") && b3.retreiveB().contains("a1") && b3.retreiveB().contains("a2") && b3.retreiveB().contains("a3") && b3.retreiveB().contains("a4") &&
static void main(java.lang.String[] args)
           
protected  void setUp()
          common setUp routine, used for every test.
static junit.framework.Test suite()
           
 void testBasicClearTxCall()
           
 void testBasicClearTxCont()
           
 void testBasicClearTxNo()
           
 void testBasicClearTxRb()
           
 void testBasicGetEmptyTxCall()
           
 void testBasicGetEmptyTxCont()
           
 void testBasicGetEmptyTxNo()
           
 void testBasicGetEmptyTxRb()
           
 void testBasicSetEmptyTxCall()
           
 void testBasicSetEmptyTxCont()
           
 void testBasicSetEmptyTxNo()
           
 void testBasicSetEmptyTxRb()
           
 void testCohBeanRemoveATxCall()
           
 void testCohBeanRemoveATxNo()
           
 void testCohBeanRemoveATxRb()
           
 void testCohBeanRemoveBTxCall()
           
 void testCohBeanRemoveBTxNo()
           
 void testCohBeanRemoveBTxRb()
           
 void testCohRemoveATxCall()
           
 void testCohRemoveATxNo()
           
 void testCohRemoveATxRb()
           
 void testCohRemoveBTxCall()
           
 void testCohRemoveBTxNo()
           
 void testCohRemoveBTxRb()
           
 void testCohRemoveInRelTxCall()
           
 void testCohRemoveInRelTxCont()
           
 void testCohRemoveInRelTxNo()
           
 void testCohRemoveInRelTxRb()
           
 void testCoSetFirstTxCall()
           
 void testCoSetFirstTxCont()
           
 void testCoSetFirstTxNo()
           
 void testCoSetFirstTxRb()
           
 void testCoSetRemoveTxCall()
           
 void testCoSetRemoveTxNo()
           
 void testCoSetRemoveTxRb()
           
 void testCoSetSecondTxCall()
           
 void testCoSetSecondTxCont()
           
 void testCoSetSecondTxNo()
           
 void testCoSetSecondTxRb()
           
 void testPhil()
           
 
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_mnbEC2

public F_Relation_mnbEC2(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 'a0' 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 a0-b0

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

testPhil

public void testPhil()
              throws java.lang.Exception

_testBasicClear

public void _testBasicClear(int tx)
                     throws java.lang.Exception
Ckeck clear function

testBasicClearTxNo

public void testBasicClearTxNo()
                        throws java.lang.Exception

testBasicClearTxCall

public void testBasicClearTxCall()
                          throws java.lang.Exception

testBasicClearTxCont

public void testBasicClearTxCont()
                          throws java.lang.Exception

testBasicClearTxRb

public void testBasicClearTxRb()
                        throws java.lang.Exception

_testCohRemoveInRel

public void _testCohRemoveInRel(int tx)
                         throws java.lang.Exception
Remove an element in a relation.

testCohRemoveInRelTxNo

public void testCohRemoveInRelTxNo()
                            throws java.lang.Exception

testCohRemoveInRelTxCall

public void testCohRemoveInRelTxCall()
                              throws java.lang.Exception

testCohRemoveInRelTxCont

public void testCohRemoveInRelTxCont()
                              throws java.lang.Exception

testCohRemoveInRelTxRb

public void testCohRemoveInRelTxRb()
                            throws java.lang.Exception

_testCoSetFirst

public void _testCoSetFirst(int tx)
                     throws java.lang.Exception
Ckeck the coherence §10.3.7.6: a1.assignB(a3.retrieveB()) => a1.retreiveB().contains("b2") && a1.retreiveB().contains("b3") && a1.retreiveB().contains("b4") && a3.retreiveB().contains("b2") && a3.retreiveB().contains("b3") && a3.retreiveB().contains("b4") && b1.retreiveB().contains("a2") && b2.retreiveB().contains("a1") && b2.retreiveB().contains("a2") && b2.retreiveB().contains("a3") && b3.retreiveB().contains("b4") && b3.retreiveB().contains("a1") && b3.retreiveB().contains("a2") && b3.retreiveB().contains("a3") && b4.retreiveB().contains("a1") && b4.retreiveB().contains("a3") && b4.retreiveB().contains("a4") && b4.retreiveB().contains("a5") &&

testCoSetFirstTxNo

public void testCoSetFirstTxNo()
                        throws java.lang.Exception

testCoSetFirstTxCall

public void testCoSetFirstTxCall()
                          throws java.lang.Exception

testCoSetFirstTxCont

public void testCoSetFirstTxCont()
                          throws java.lang.Exception

testCoSetFirstTxRb

public void testCoSetFirstTxRb()
                        throws java.lang.Exception

_testCoSetSecond

public void _testCoSetSecond(int tx)
                      throws java.lang.Exception
Ckeck the coherence §10.3.7.6 : a1.getB().add(b3) => a1.retreiveB().contains("b1") && a1.retreiveB().contains("b2") && a1.retreiveB().contains("b3") && b3.retreiveB().contains("a1") && b3.retreiveB().contains("a2") && b3.retreiveB().contains("a3") && b3.retreiveB().contains("a4") &&

testCoSetSecondTxNo

public void testCoSetSecondTxNo()
                         throws java.lang.Exception

testCoSetSecondTxCall

public void testCoSetSecondTxCall()
                           throws java.lang.Exception

testCoSetSecondTxCont

public void testCoSetSecondTxCont()
                           throws java.lang.Exception

testCoSetSecondTxRb

public void testCoSetSecondTxRb()
                         throws java.lang.Exception

_testCoSetRemove

public void _testCoSetRemove(int tx)
                      throws java.lang.Exception
Ckeck the coherence §10.3.7.6 : a2.getB().remove(b2) => a2.retreiveB().contains("b1") && a2.retreiveB().contains("b3") && b2.retreiveB().contains("a1") && b2.retreiveB().contains("a3") && !b2.retreiveB().contains("a2")

testCoSetRemoveTxNo

public void testCoSetRemoveTxNo()
                         throws java.lang.Exception

testCoSetRemoveTxCall

public void testCoSetRemoveTxCall()
                           throws java.lang.Exception

testCoSetRemoveTxRb

public void testCoSetRemoveTxRb()
                         throws java.lang.Exception

_testCohRemoveB

public void _testCohRemoveB(int tx)
                     throws java.lang.Exception
Test of coherence b2.remove() => a1.retrieveB()=null && a2.retrieveB()=null && a3.retrieveB()=null

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 b2.remove() => a1.retrieveB()=null && a2.retrieveB()=null && a3.retrieveB()=null Same as _testCohRemoveB 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

_testCohRemoveA

public void _testCohRemoveA(int tx)
                     throws java.lang.Exception
Test of coherence a2.remove() => b1.retrieveB()=null && b2.retrieveB()=null && b3.retrieveB()=null

testCohRemoveATxNo

public void testCohRemoveATxNo()
                        throws java.lang.Exception

testCohRemoveATxCall

public void testCohRemoveATxCall()
                          throws java.lang.Exception

testCohRemoveATxRb

public void testCohRemoveATxRb()
                        throws java.lang.Exception

_testCohBeanRemoveA

public void _testCohBeanRemoveA(int tx)
                         throws java.lang.Exception
Test of coherence a2.remove() => b1.retrieveB()=null && b2.retrieveB()=null && b3.retrieveB()=null Same as _testCohRemoveA except that the called remove method is on the bean instead of the home.

testCohBeanRemoveATxNo

public void testCohBeanRemoveATxNo()
                            throws java.lang.Exception

testCohBeanRemoveATxCall

public void testCohBeanRemoveATxCall()
                              throws java.lang.Exception

testCohBeanRemoveATxRb

public void testCohBeanRemoveATxRb()
                            throws java.lang.Exception

suite

public static junit.framework.Test suite()

main

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