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

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.objectweb.jonas.jtests.util.JTestCase
                    |
                    +--org.objectweb.jonas.jtests.clients.entity.A_VariousPKEC
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
F_VariousPKEC, F_VariousPKEC2

public abstract class A_VariousPKEC
extends JTestCase

This set of test are all tests common to CMP version 1 and CMP version 2 These are tests about the different cases of the primary key type: - primary key that maps to a single field in the entity bean class (java.lang.Integer), - unknown primary key class at the bean development phase, (defered primary key type specification to the deployment phase). Note that the compilation of this kind of bean is already a good test !! The case of the primary key maps to multiple fields in the entity bean class is already tested in the "inherit" test. Beans used: ebasic/Account, ebasic/Person

Author:
Helene Joanin (jonas team)

Fields inherited from class org.objectweb.jonas.jtests.util.JTestCase
ictx, isInit, jonasName, msgerror, testtorun, utx
 
Constructor Summary
A_VariousPKEC(java.lang.String name)
           
 
Method Summary
abstract  AccountHome getAccountHome()
          Return AccountHome, that can be either CMP version 1 or CMP version 2 bean.
abstract  PersonHome getPersonHome()
          Return PersonHome, that can be either CMP version 1 or CMP version 2 bean.
protected  void setUp()
          common setUp routine, used for every test.
 void testSpkCreate()
          Creation of a bean with PK that maps a single field
 void testSpkFindAll()
          findAll beans with PK that maps a single field
 void testSpkFindByPrimaryKey()
          findByPrimaryKey of a bean with PK that maps a single field
 void testSpkRemove()
          Remove of a bean with PK that maps a single field
 void testUpkCreate()
          Creation of a bean with unknown PK class at the bean development phase
 void testUpkFindAll()
          findAll beans with unknown PK class at the bean development phase
 void testUpkFindByPrimaryKey()
          findByPrimaryKey of a bean with unknown PK class at the bean development phase
 void testUpkRemove()
          Remove of a bean with unknown PK class at the bean development phase
 
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
 

Constructor Detail

A_VariousPKEC

public A_VariousPKEC(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

getAccountHome

public abstract AccountHome getAccountHome()
Return AccountHome, that can be either CMP version 1 or CMP version 2 bean.

getPersonHome

public abstract PersonHome getPersonHome()
Return PersonHome, that can be either CMP version 1 or CMP version 2 bean.

testSpkCreate

public void testSpkCreate()
                   throws java.lang.Exception
Creation of a bean with PK that maps a single field

testSpkRemove

public void testSpkRemove()
                   throws java.lang.Exception
Remove of a bean with PK that maps a single field

testSpkFindByPrimaryKey

public void testSpkFindByPrimaryKey()
                             throws java.lang.Exception
findByPrimaryKey of a bean with PK that maps a single field

testSpkFindAll

public void testSpkFindAll()
                    throws java.lang.Exception
findAll beans with PK that maps a single field

testUpkCreate

public void testUpkCreate()
                   throws java.lang.Exception
Creation of a bean with unknown PK class at the bean development phase

testUpkRemove

public void testUpkRemove()
                   throws java.lang.Exception
Remove of a bean with unknown PK class at the bean development phase

testUpkFindByPrimaryKey

public void testUpkFindByPrimaryKey()
                             throws java.lang.Exception
findByPrimaryKey of a bean with unknown PK class at the bean development phase

testUpkFindAll

public void testUpkFindAll()
                    throws java.lang.Exception
findAll beans with unknown PK class at the bean development phase