| org.jboss.test.util.ejb.EJBTestCase
All known Subclasses: org.jboss.test.cmp2.commerce.OneToOneUniTest, org.jboss.test.cmp2.jbas3717.JBAS3717UnitTestCase, org.jboss.test.cmp2.jbas979.JBAS979UnitTestCase, org.jboss.test.cmp2.jbas1665.JBAS1665UnitTestCase, org.jboss.test.cmp2.simple.SimpleUnitTestCase, org.jboss.test.cmp2.commerce.QueryTest, org.jboss.test.cmp2.commerce.ManyToManyBiTest, org.jboss.test.cmp2.jbas1361.JBAS1361UnitTestCase, org.jboss.test.cmp2.commerce.CommerceTest, org.jboss.test.cmp2.readonly.ReadonlyUnitTestCase, org.jboss.test.cmp2.commerce.CascadeDeleteTest, org.jboss.test.cmp2.commerce.LimitOffsetTest, org.jboss.test.exception.EntityExceptionUnitTestCase, org.jboss.test.cmp2.commerce.UserLocalTest, org.jboss.test.cmp2.relationship.oneToOneBidirectional.ABTest, org.jboss.test.cmp2.distinct.DistinctUnitTestCase, org.jboss.test.exception.ExceptionUnitTestCase, org.jboss.test.cmp2.ejbselect.EJBSelectUnitTestCase, org.jboss.test.cmp2.cmrtree.test.CascadeDeleteUnitTestCase, org.jboss.test.cmp2.relationship.oneToManyUnidirectional.ABTest, org.jboss.test.cmp2.commerce.ManyToOneUniTest, org.jboss.test.cmp2.relationship.oneToManyBidirectional.ABTest, org.jboss.test.naming.ejb.NamingTests, org.jboss.test.cmp2.enums.test.EnumUnitTestCase, org.jboss.test.cmp2.relationship.manyToManyUnidirectional.ABTest, org.jboss.test.cmp2.commerce.LazyResultSetLoadingTest, org.jboss.test.cmp2.partitionindex.PartitionIndexUnitTestCase, org.jboss.test.cmp2.fkmapping.test.FKMappingUnitTestCase, org.jboss.test.cmp2.commerce.OneToManyBiTest, org.jboss.test.cmp2.ageout.test.JDBC2PmAgeOutUnitTestCase, org.jboss.test.cmp2.relationship.oneToOneUnidirectional.ABTest, org.jboss.test.cmp2.jbas3541.JBAS3541UnitTestCase, org.jboss.test.cmp2.relationship.manyToManyBidirectional.ABTest, org.jboss.test.cmp2.idxandusersql.test.IdxAndUsersqlUnitTestCase, org.jboss.test.cmp2.commerce.TxTesterTest, org.jboss.test.cts.ejb.LocalEjbTests, org.jboss.test.cmp2.dbschema.util.AbstractDBSchemaTest, org.jboss.test.cmp2.relationship.manyToOneUnidirectional.ABTest, org.jboss.test.cmp2.simple.PageSizeUnitTestCase, org.jboss.test.cmp2.keygen.test.KeyGenerationUnitTestCase, org.jboss.test.cmp2.lob.LOBUnitTestCase,
EJBTestCase | public class EJBTestCase extends TestCase (Code) | | An ejb test case is an extension to test case where the test is executed
in the ejb server's virtual machine.
Two new methods setUpEJB and tearDownEJB have been added. These methods
work just like setUp and tearDown except they run in a sepperate transaction.
The execution order is as follows:
1. setUpEJB (TX 1)
2. run (TX 2)
2.1. runBare
2.1.1 setUp
2.1.2
2.1.3 tearDown
3. ejbTearDown (TX 2)
For an ejb test case to run successfully, the following must be setup:
1. The ejb test case class must be availabe to the client vm.
2. The ejb test case class must be availabe to the EJBTestRunner bean
on the server.
3. The EJBTestRunnerHome must be bound to "ejb/EJBTestRunner" in the
jndi context obtained from new InitialContext();
4. The EJBTestRunner bean must be configured as specified in the
EJBTestRunner javadoc.
See Also: EJBTestRunner See Also: junit.framework.TestCase author: Dain Sundstrom author: Scott Stark author: Dimitris Andreadis version: $Revision: 61778 $ |
Constructor Summary | |
public | EJBTestCase(String methodName) Constructs a test case that will run the method with the specified name. |
EJBTestCase | public EJBTestCase(String methodName)(Code) | | Constructs a test case that will run the method with the specified name.
Parameters: methodName - the name of the method that will executed when this test is run |
getEJBRunnerJndiName | public String getEJBRunnerJndiName()(Code) | | Allow EJBTestCase subclasses to override the EJBRunnerHome JNDI name
The JNDI name of the EJBRunnerHome home interface binding. Thedefault is "ejb/EJBTestRunner" |
getProps | public Properties getProps()(Code) | | the properties associated with the test case |
isServerSide | public boolean isServerSide()(Code) | | Is this class running on the server side?
true if this class is running on the server side |
run | public void run(TestResult result)(Code) | | |
setProps | public void setProps(Properties props)(Code) | | Parameters: props - the properties associated with the test case |
setServerSide | public void setServerSide(boolean serverSide)(Code) | | Sets the flag that is used to determine if the class
is running on the server side.
Parameters: serverSide - boolean flag that this class uses to determineif it's running on the server side. |
setUpEJB | public void setUpEJB(Properties props) throws Exception(Code) | | Sets up the ejb test case. This method is called before
each test is executed and is run in a private transaction.
Parameters: props - the properties passed in from the client throws: Exception - if a problem occures |
tearDownEJB | public void tearDownEJB(Properties props) throws Exception(Code) | | Tears down the ejb test case. This method is called after
each test is executed and is run in a private transaction.
Parameters: props - the properties passed in from the client throws: Exception - if a problem occures |
|
|