Package org.jboss.arquillian.container.spi.client.deployment

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription


   }

   @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);
View Full Code Here


   }
  
   @Test(expected = IllegalArgumentException.class)
   public void shouldThrowExceptionOnDeployWhenContainerNotStarted() throws Exception
   {
      DeploymentDescription description = new DeploymentDescription(DEPLOYMENT_NAME, ShrinkWrap.create(JavaArchive.class));
      description.setTarget(new TargetDescription("_CONTAINER_STOPPED_"));
      scenario.get().addDeployment(description);
     
      deployer.get().deploy(DEPLOYMENT_NAME);
   }
View Full Code Here

   }
  
   @Test(expected = IllegalArgumentException.class)
   public void shouldThrowExceptionOnUnDeployWhenContainerNotRunning() throws Exception
   {
      DeploymentDescription description = new DeploymentDescription(DEPLOYMENT_NAME, ShrinkWrap.create(JavaArchive.class));
      description.setTarget(new TargetDescription("_CONTAINER_STOPPED_"));
      scenario.get().addDeployment(description);
     
      deployer.get().undeploy(DEPLOYMENT_NAME);
   }
View Full Code Here

    }

    public void observeBeforeDeploy(@Observes BeforeDeploy event) {
        DeploymentReport deploymentReport = new DeploymentReport();

        DeploymentDescription description = event.getDeployment();

        deploymentReport.setArchiveName(description.getArchive().getName());
        deploymentReport.setName(description.getName());

        int order = description.getOrder();
        if (order > 0) {
            deploymentReport.setOrder(order);
        }

        String protocol = description.getProtocol().getName();
        if (!protocol.equals("_DEFAULT_")) {
            deploymentReport.setProtocol(protocol);
        } else {
            deploymentReport.setProtocol("_DEFAULT_");
        }

        deploymentReport.setTarget(description.getTarget().getName());

        for (ContainerReport containerReport : reporter.get().getLastTestSuiteReport().getContainerReports()) {
            if (containerReport.getQualifier().equals(deploymentReport.getTarget())) {
                containerReport.getDeploymentReports().add(deploymentReport);
                break;
View Full Code Here

      //when(injector.get()).thenReturn(InjectorImpl.of(manager));
      when(serviceLoader.onlyOne(eq(DeployableContainer.class))).thenReturn(deployableContainer1);

      Archive<?> archive = ShrinkWrap.create(JavaArchive.class);

      scenario.addDeployment(new DeploymentDescription(DEPLOYMENT_1_NAME, archive).setTarget(new TargetDescription(CONTAINER_1_NAME)));

      registry.create(container1, serviceLoader);

      bind(SuiteScoped.class, ContainerRegistry.class, registry);
      bind(ClassScoped.class, DeploymentScenario.class, scenario);
View Full Code Here

      Mockito.when(registry.getContainer(
            new TargetDescription("X"))).thenReturn(new ContainerImpl("X", deployableContainer, new ContainerDefImpl("X")));
      Mockito.when(registry.getContainer(
            new TargetDescription("Z"))).thenReturn(new ContainerImpl("Z", deployableContainer, new ContainerDefImpl("Z")));

      Deployment deploymentZ = new Deployment(new DeploymentDescription("Z", ShrinkWrap.create(JavaArchive.class))
                                                   .setTarget(new TargetDescription("Z")));
      Deployment deploymentX = new Deployment(new DeploymentDescription("X", ShrinkWrap.create(JavaArchive.class))
                                                   .setTarget(new TargetDescription("X")));

      Mockito.when(scenario.deployment(new DeploymentTargetDescription("Z"))).thenReturn(deploymentZ);
      Mockito.when(scenario.deployment(new DeploymentTargetDescription("X"))).thenReturn(deploymentX);
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.