}
@Test
public void shouldHandleMultipleDeploymentsAllSet() throws Exception
{
DeploymentScenario scenario = new AnnotationDeploymentScenarioGenerator().generate(new TestClass(MultiDeploymentsSet.class));
Assert.assertNotNull(scenario);
Assert.assertEquals(
"Verify all deployments were found",
2, scenario.getDeployments().size());
DeploymentDescription deploymentOne = scenario.getDeployments().get(0);
Assert.assertEquals(
"Verify deployment has specified target",
new TargetDescription("target-first"),
deploymentOne.getTarget());
Assert.assertEquals(
"Verify deployment has specified protocol",
new ProtocolDescription("protocol-first"),
deploymentOne.getProtocol());
Assert.assertEquals(1, deploymentOne.getOrder());
Assert.assertEquals(false, deploymentOne.managed());
Assert.assertEquals(false, deploymentOne.testable());
Assert.assertTrue(JavaArchive.class.isInstance(deploymentOne.getArchive()));
Assert.assertNull(deploymentOne.getExpectedException());
DeploymentDescription deploymentTwo = scenario.getDeployments().get(1);
Assert.assertEquals(
"Verify deployment has specified target",
new TargetDescription("target-second"),
deploymentTwo.getTarget());