Deployment of any test deployments is done in the setup of the test. The
HibernateEjbInterceptorUnitTestCase
would add a suite method to deploy/undeploy a har-test.ear for example:
public class HibernateEjbInterceptorUnitTestCase extends JBossTestCase {
/** Setup the test suite.
*/
public static Test suite() throws Exception
{
return getDeploySetup(HibernateEjbInterceptorUnitTestCase.class, "har-test.ear");
}
...
}
If you need to perform additional test setup/tearDown you can do that by extending the test setup class like this code from the
SRPUnitTestCase
:
/** Setup the test suite.
*/
public static Test suite() throws Exception
{
TestSuite suite = new TestSuite();
suite.addTest(new TestSuite(SRPUnitTestCase.class));
// Create an initializer for the test suite
TestSetup wrapper = new JBossTestSetup(suite)
{
protected void setUp() throws Exception
{
super.setUp();
deploy(JAR);
// Establish the JAAS login config
String authConfPath = super.getResourceURL("security-srp/auth.conf");
System.setProperty("java.security.auth.login.config", authConfPath);
}
protected void tearDown() throws Exception
{
undeploy(JAR);
super.tearDown();
}
};
return wrapper;
}
Referenced by:*
Comments