| org.mockejb.OptionalCactusTestCase org.mockejb.test.JdbcAndTransactionTest
JdbcAndTransactionTest | public class JdbcAndTransactionTest extends OptionalCactusTestCase (Code) | | Demonstrates the use of JDBC and transactions with MockEJB.
author: Alexander Ananiev |
Method Summary | |
public void | setUp() Deploys and creates EJBs needed for our tests. | public void | tearDown() Performs the necessary cleanup by restoring the system properties that
were modified by MockContextFactory.setAsInitial().
This is needed in case if the test runs inside the container, so it would
not affect the tests that run after it. | public void | testJdbc() Tests EJB interaction with the database without transactions, i.e,
the transactional policy is "Suppports". | public void | testTransactions() Demonstrates the use of transactions with MockEJB. |
JdbcAndTransactionTest | public JdbcAndTransactionTest(String name)(Code) | | Constructor for JdbcTransactionTest.
Parameters: name - name of the test |
setUp | public void setUp() throws Exception(Code) | | Deploys and creates EJBs needed for our tests.
|
tearDown | public void tearDown()(Code) | | Performs the necessary cleanup by restoring the system properties that
were modified by MockContextFactory.setAsInitial().
This is needed in case if the test runs inside the container, so it would
not affect the tests that run after it.
|
testJdbc | public void testJdbc() throws Exception(Code) | | Tests EJB interaction with the database without transactions, i.e,
the transactional policy is "Suppports".
|
testTransactions | public void testTransactions() throws Exception(Code) | | Demonstrates the use of transactions with MockEJB.
Outside of the container, we use MockTransaction, inside we can rely on
the real transaction support. Inside the container we can't really test much.
|
|
|