[jboss-dev-forums] [Design of POJO Server] - AbstractDeploymentTest still using DeploymentContext
alesj
do-not-reply at jboss.com
Fri Nov 9 09:01:08 EST 2007
Currently AbstractDeploymentTest class is still using DeploymentContext (DC), which as I remember should just be an implementation detail.
I was able to easily refactor DC usage to DeploymentUnit (DU).
Except for the DeploymentState (DS) code snippet:
| public void visit(DeploymentUnit info)
| {
| String shortName = shortNameFromDeploymentName(info.getName());
| log.info("Found deployment " + shortName);
| boolean found = expected.remove(shortName);
| if (found == false)
| fail(shortName + " not expected, or duplicate?");
| else
| {
| DeploymentState state = DeploymentState.DEPLOYED; // FIXME!!
| assertEquals("Should be fully deployed: " + shortName + " state=" + state, DeploymentState.DEPLOYED, state);
| }
| }
|
If I want to get to DS, I need to expose this in MainDeployerMBean or again use DC.
And this needs changing as well:
| protected void assertNotDeployed(String deployment) throws Exception
| {
| DeploymentUnit result = getDeploymentUnit(deployment);
| assertNull("Should not be deployed " + result, result);
| }
|
Since this previously never returned null.
Perhaps it will now with the new DU change ... need to test this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103255#4103255
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103255
More information about the jboss-dev-forums
mailing list