Contains all base methods for using during the tests about the
container-managed.
author: Gisele Pinheiro Souza author: Eduardo Studzinski Estima de Castro
testGetUserTransactionWithEJBContext() Verifies if the container throws a NameNotFoundException when a bean with
container-managed transaction tries to get an UserTransaction.
public void
testGetUserTransactionWithLookup() Verifies if the container throws an IllegalStateException when a bean with
container-managed transaction tries to get an UserTransaction.
public void testGetUserTransactionWithEJBContext() throws Exception(Code)
Verifies if the container throws a NameNotFoundException when a bean with
container-managed transaction tries to get an UserTransaction. The bean
gets the UserTransaction by using a lookup.
throws: Exception - if an error during the tests occurs.
testGetUserTransactionWithLookup
public void testGetUserTransactionWithLookup() throws Exception(Code)
Verifies if the container throws an IllegalStateException when a bean with
container-managed transaction tries to get an UserTransaction. The bean
gets the UserTransaction by using a EJBContext.
throws: Exception - if an error during the tests occurs.
Verifies if the transaction in the client side is active.
true if the transaction is active, false otherwise. throws: Exception - id a lookup error occurs
Verifies if the table was created in the database.
Parameters: database - the database name. Parameters: tableName - the table name verified. throws: NamingException - if a lookup error occurs. throws: SQLException - if a database error occurs.