md.addDeployment("thing.xar");
md.process();
HashSet<IDeployerMethod> interceptedCalled = DeployerAspects.getCalled();
SampleDeployer d1 = (SampleDeployer) getBean("SampleDeployer1");
SampleDeployer d2 = (SampleDeployer) getBean("SampleDeployer2");
assertTrue("SampleDeployer1.prepareDeploy",
d1.getCalled().contains(IDeployerMethod.prepareDeploy));
assertTrue("SampleDeployer1.commitDeploy",
d1.getCalled().contains(IDeployerMethod.commitDeploy));
assertTrue("SampleDeployer2.prepareDeploy",
d2.getCalled().contains(IDeployerMethod.prepareDeploy));
assertTrue("SampleDeployer2.commitDeploy",
d2.getCalled().contains(IDeployerMethod.commitDeploy));
assertTrue("DeployerAspects.prepareDeploy",
interceptedCalled.contains(IDeployerMethod.prepareDeploy));
assertTrue("DeployerAspects.commitDeploy",
interceptedCalled.contains(IDeployerMethod.commitDeploy));
md.removeDeployment("thing.xar");
md.process();
assertTrue("SampleDeployer1.prepareUndeploy",
d1.getCalled().contains(IDeployerMethod.prepareUndeploy));
assertTrue("SampleDeployer1.commitUndeploy",
d1.getCalled().contains(IDeployerMethod.commitUndeploy));
assertTrue("SampleDeployer2.prepareUndeploy",
d2.getCalled().contains(IDeployerMethod.prepareUndeploy));
assertTrue("SampleDeployer2.commitUndeploy",
d2.getCalled().contains(IDeployerMethod.commitUndeploy));
assertTrue("DeployerAspects.prepareUndeploy",
interceptedCalled.contains(IDeployerMethod.prepareUndeploy));
assertTrue("DeployerAspects.commitUndeploy",
interceptedCalled.contains(IDeployerMethod.commitUndeploy));