deployment.shouldBeManaged(deploymentAnnotation.managed()); deployment.setOrder(deploymentAnnotation.order()); if (target != null)
deployment.shouldBeManaged(deploymentAnnotation.managed()); deployment.setOrder(deploymentAnnotation.order()); if (target != null)
new DeploymentDescription(javaArchive.getName(), javaArchive); deploymentDescription.shouldBeTestable(testable).shouldBeManaged( true);
@Override public List<DeploymentDescription> generate(TestClass testClass) { List<DeploymentDescription> deployments = super.generate(testClass); List<DeploymentDescription> updatedDeployments = new ArrayList<DeploymentDescription>(); for (DeploymentDescription currentDeploymentDescription : deployments) { if (currentDeploymentDescription.getArchive() instanceof PortletArchive) { DeploymentDescription newDescription = new DeploymentDescription(currentDeploymentDescription.getName(), currentDeploymentDescription.getArchive().as(WebArchive.class)); newDescription.shouldBeTestable(currentDeploymentDescription.testable()) .shouldBeManaged(currentDeploymentDescription.managed()) .setOrder(currentDeploymentDescription.getOrder()) .setTarget(currentDeploymentDescription.getTarget()) .setProtocol(currentDeploymentDescription.getProtocol()) .setExpectedException(currentDeploymentDescription.getExpectedException()); updatedDeployments.add(newDescription); } else { updatedDeployments.add(currentDeploymentDescription); } } return updatedDeployments; } }
@Test public void shouldFireDeploymentEventOnDeploy() throws Exception { DeploymentDescription description = new DeploymentDescription(DEPLOYMENT_NAME, ShrinkWrap.create(JavaArchive.class)); description.shouldBeManaged(false); description.setTarget(new TargetDescription("_DEFAULT_")); scenario.get().addDeployment(description); deployer.get().deploy(DEPLOYMENT_NAME); assertEventFired(DeployDeployment.class, 1); }
@Test public void shouldFireUnDeploymentEventOnUnDeploy() throws Exception { DeploymentDescription description = new DeploymentDescription(DEPLOYMENT_NAME, ShrinkWrap.create(JavaArchive.class)); description.shouldBeManaged(false); description.setTarget(new TargetDescription("_DEFAULT_")); scenario.get().addDeployment(description); deployer.get().undeploy(DEPLOYMENT_NAME); assertEventFired(UnDeployDeployment.class, 1); }
@Test public void shouldFireDeploymentEventOnDeploy() throws Exception { DeploymentDescription description = new DeploymentDescription(DEPLOYMENT_NAME, ShrinkWrap.create(JavaArchive.class)); description.shouldBeManaged(false); description.setTarget(new TargetDescription("_DEFAULT_")); scenario.get().addDeployment(description); deployer.get().deploy(DEPLOYMENT_NAME); assertEventFired(DeployDeployment.class, 1); }
@Test public void shouldFireUnDeploymentEventOnUnDeploy() throws Exception { DeploymentDescription description = new DeploymentDescription(DEPLOYMENT_NAME, ShrinkWrap.create(JavaArchive.class)); description.shouldBeManaged(false); description.setTarget(new TargetDescription("_DEFAULT_")); scenario.get().addDeployment(description); deployer.get().undeploy(DEPLOYMENT_NAME); assertEventFired(UnDeployDeployment.class, 1); }
.setOrder(3) .shouldBeTestable(false) .shouldBeManaged(false)); .setTarget(new TargetDescription(CONTAINER_1_NAME)) .setOrder(4) .shouldBeManaged(true));
private void setupAndExecuteDeployment(String containerName, boolean managed) { DeploymentDescription description = createDeploymentDescription(containerName) .shouldBeManaged(managed); scenario.get().addDeployment(description); controller.get().start(containerName); controller.get().start(containerName, new Config().add("managementPort", "19999").map()); }
private void setupAndExecuteDeployment(String containerName, boolean managed) { DeploymentDescription description = createDeploymentDescription(containerName) .shouldBeManaged(managed); scenario.get().addDeployment(description); controller.get().start(containerName); controller.get().start(containerName, new Config().add("managementPort", "19999").map()); }
private void setupAndExecuteUnDeployment(String containerName, boolean managed) { DeploymentDescription description = createDeploymentDescription(containerName) .shouldBeManaged(managed); scenario.get().addDeployment(description); controller.get().start(containerName); scenario.get().deployment(new DeploymentTargetDescription(DEPLOYMENT_NAME)).deployed(); controller.get().stop(containerName); }
private void setupAndExecuteUnDeployment(String containerName, boolean managed) { DeploymentDescription description = createDeploymentDescription(containerName) .shouldBeManaged(managed); scenario.get().addDeployment(description); controller.get().start(containerName); scenario.get().deployment(new DeploymentTargetDescription(DEPLOYMENT_NAME)).deployed(); controller.get().stop(containerName); }
deploymentDescription.shouldBeManaged(deployment.managed()); deploymentDescription.setOrder(deployment.order());
deploymentDescription.shouldBeManaged(deployment.managed()); deploymentDescription.setOrder(deployment.order());