|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--org.objectweb.jonas.jtests.util.JTestCase | +--org.objectweb.jonas.jtests.clients.entity.A_BasicHomeInterface
test cases common to both suites CMP and BMP.
Field Summary | |
protected static SimpleHome |
home
|
Fields inherited from class org.objectweb.jonas.jtests.util.JTestCase |
ictx, isInit, jonasName, msgerror, testtorun, utx |
Constructor Summary | |
A_BasicHomeInterface(java.lang.String name)
|
Method Summary | |
void |
essaiA1()
|
void |
essaiA1C()
|
void |
essaiA2()
|
void |
essaiA2C()
|
void |
essaiC1()
|
void |
essaiC2()
|
void |
essaiF1()
|
void |
essaiF2()
|
void |
essaiR1()
|
void |
essaiR1C()
|
void |
essaiR2()
|
void |
essaiR2C()
|
abstract SimpleHome |
getHome()
return SimpleHome, that can be either BMP or CMP bean. |
protected void |
setUp()
init environment: - load beans - create/init database for entities. |
void |
testCreateFindUserTx()
Verify that we can create an entity and retrieve it by a finder method inside the same transaction |
void |
testCreateNewEntity()
testCreateNewEntity verify that we can create a new entityBean We create a new entity testCreateNewEntity, 20, 6 the findByTestName("testCreateNewEntity") must pass and the resulting must be equals to 20 pre condition the testCreateNewEntity element must not exist |
void |
testCreateRolledBack()
|
void |
testFindByPK()
testFindByPK verify that findByPrimaryKey find an existing entityBean pre condition: an element with "pk1" as primary key must exist in the database findByPrimaryKey("testFindByPK") must pass. |
void |
testFinderCollection()
testFinderCollection verify a finder method that return a Collection pre condition there are 4 elements with c_numtest =4 (pk4,...,pk7) findInCollection returns all the beans where c_numtest = 4 this test is equivalent to testcase2 in SimpleTest in finder_col |
void |
testFinderEnum()
testFinderEnum verify a finder method that return a Enumeration pre condition there are 3 elements with num =4 all of them have a field info equals to 10 |
void |
testFinderEnumObjNotFound()
testFinderEnumObjNotFound verify that a finder method that can return a Enumeration return an empty enumeration where there is no matching bean pre condition there is no elements with NumTest = 999 |
void |
testFindUnexistingPK()
testFindUnexistingPK verify that findByPrimaryKey throw Finder Exception when the specified entity beab doesn't exist. pre condition there is no element with "pk999" in the table findByPrimaryKey("testFindUnexistingPK") must throw Finder Exception |
void |
testHomeRemoveCommitted()
test remove by PK in transaction |
void |
testHomeRemoveRolledBack()
testHomeRemoveRolledBack verify that we can access to a bean after remove has been rolledback it is the same that testRemoveRolledBack but with home.remove(pk); pre condition the testHomeRemoveRolledBack must exist |
void |
testOtherFinder()
testOtherFinder verify that we can use finder method other than findByPrimaryKey pre condition an element with "pk2" as primary key must exist in the database findByTestName("testOtherFinder") must pass |
void |
testRemoveByPKTwice()
test remove by PK twice. test that a removeByPrimaryKey can be followed by a create of the same entity. |
void |
testRemoveInsideTransaction()
testRemoveInsideTransaction Verify that after a remove inside a transaction, the bean cannot be found anymore pre condition the testRemoveInsideTransaction must exist |
void |
testRemoveInTransaction()
same test without second tx. |
void |
testRemoveRolledBack()
testRemoveRolledBack verify that we can access to a bean after remove has been rolledback pre condition the testRemoveRolledBack must exist |
void |
testRemoveTwice()
test remove by EJBObject twice. test that a remove can be followed by a create of the same entity. |
void |
testRemoveViaEJBHome()
|
void |
testRemoveViaEJBObject()
|
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 |
protected static SimpleHome home
Constructor Detail |
public A_BasicHomeInterface(java.lang.String name)
Method Detail |
protected void setUp()
setUp
in class JTestCase
public abstract SimpleHome getHome()
public void testFindByPK() throws java.lang.Exception
public void testFindUnexistingPK() throws java.lang.Exception
public void testOtherFinder() throws java.lang.Exception
public void testFinderEnumObjNotFound() throws java.lang.Exception
public void testCreateNewEntity() throws java.lang.Exception
public void essaiC1() throws java.lang.Exception
public void essaiA1() throws java.lang.Exception
public void essaiA1C() throws java.lang.Exception
public void essaiF1() throws java.lang.Exception
public void essaiR1() throws java.lang.Exception
public void essaiR1C() throws java.lang.Exception
public void essaiC2() throws java.lang.Exception
public void essaiA2() throws java.lang.Exception
public void essaiA2C() throws java.lang.Exception
public void essaiF2() throws java.lang.Exception
public void essaiR2() throws java.lang.Exception
public void essaiR2C() throws java.lang.Exception
public void testCreateRolledBack() throws java.lang.Exception
public void testRemoveViaEJBHome() throws java.lang.Exception
public void testRemoveByPKTwice() throws java.lang.Exception
public void testRemoveTwice() throws java.lang.Exception
public void testRemoveViaEJBObject() throws java.lang.Exception
public void testRemoveInsideTransaction() throws java.lang.Exception
public void testRemoveInTransaction() throws java.lang.Exception
public void testHomeRemoveCommitted() throws java.lang.Exception
public void testRemoveRolledBack() throws java.lang.Exception
public void testHomeRemoveRolledBack() throws java.lang.Exception
public void testFinderEnum() throws java.lang.Exception
public void testCreateFindUserTx() throws java.lang.Exception
public void testFinderCollection() throws java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |