[
https://jira.jboss.org/jira/browse/JBMICROCONT-357?page=com.atlassian.jir...
]
Scott M Stark resolved JBMICROCONT-357.
---------------------------------------
Resolution: Done
The setUp method has been extended to look for a method specific deployment based on the
unit test class method:
protected void setUp() throws Exception
{
super.setUp();
URL url = getMethodResource();
if (url != null)
methodDeployment = deploy(url);
else
getLog().debug("No method specific deployment " +
getMethodDeployment());
afterSetUp();
}
protected String getMethodDeployment()
{
String testName = getClass().getName();
return "/" + testName.replace('.', '/') + "#" +
getName() + ".xml";
}
protected URL getMethodResource()
{
return getResource(getMethodDeployment());
}
Add support for test method specific deployments
------------------------------------------------
Key: JBMICROCONT-357
URL:
https://jira.jboss.org/jira/browse/JBMICROCONT-357
Project: JBoss Microcontainer
Issue Type: Feature Request
Components: Kernel
Affects Versions: JBossMC.2.0.0.CR1
Reporter: Scott M Stark
Assignee: Scott M Stark
Fix For: JBossMC-2.0.0.GA
It would be helpful to allow for test method specific deployments. For example, this
test:
package org.jboss.test.junit.test;
...
public class JUnitTestCase extends MicrocontainerTest
{
public void testOne() throws Exception
{
System.out.println(getBean("TheBean"));
}
public void testTwo() throws Exception
{
System.out.println(getBean("MethodBean"));
}
}
Could have one deployment for the class:
test/resources/org/jboss/test/junit/test/JUnitTestCase.xml
and also have a testTwo specific method deployment:
test/resources/org/jboss/test/junit/test/JUnitTestCase#testTwo.xml
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira