Examples of DeploymentScenario


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

      forEachDeployment(scenario.managedDeploymentsInDeployOrder(), operation);
   }

   private void forEachDeployedDeployment(Operation<Container, Deployment> operation) throws Exception
   {
      DeploymentScenario scenario = this.deploymentScenario.get();
      if(scenario == null)
      {
         return;
      }
      forEachDeployment(scenario.deployedDeploymentsInUnDeployOrder(), operation);
   }
View Full Code Here

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

   public void generateDeployment(@Observes GenerateDeployment event)
   {
      DeploymentScenarioGenerator generator = serviceLoader.get().onlyOne(
            DeploymentScenarioGenerator.class, AnnotationDeploymentScenarioGenerator.class);
     
      DeploymentScenario scenario = new DeploymentScenario();
     
      for(DeploymentDescription deployment : generator.generate(event.getTestClass()))
      {
         scenario.addDeployment(deployment);
      }

      validate(scenario);
      createTestableDeployments(scenario, event.getTestClass());
View Full Code Here

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

   private Instance<DeploymentScenario> deploymentScenario;

   @Override
   public void start(String containerQualifier)
   {
      DeploymentScenario scenario = deploymentScenario.get();
      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario in context");
      }
     
      ContainerRegistry registry = containerRegistry.get();
      if (registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }

      if (!containerExists(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("No container with the specified name exists");
      }

      if (!isManualContainer(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
      }
     
      List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));
     
      Container container = registry.getContainer(new TargetDescription(containerQualifier));

      log.info("Manual starting of a server instance");
View Full Code Here

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

   }

   @Override
   public void start(String containerQualifier, Map<String, String> config)
   {
      DeploymentScenario scenario = deploymentScenario.get();
      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario in context");
      }
     
      ContainerRegistry registry = containerRegistry.get();
      if (registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }

      if (!containerExists(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("No container with the specified name exists");
      }
     
      if (!isManualContainer(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
      }

      List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));
     
      Container container = registry.getContainer(new TargetDescription(containerQualifier));

      for (String name : config.keySet())
      {
View Full Code Here

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

   }

   @Override
   public void stop(String containerQualifier)
   {
      DeploymentScenario scenario = deploymentScenario.get();
      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario in context");
      }
     
      ContainerRegistry registry = containerRegistry.get();
      if (registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }

      if (!containerExists(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("No container with the specified name exists");
      }
     
      if (!isManualContainer(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
      }

      Container container = registry.getContainer(new TargetDescription(containerQualifier));

      List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));
     
      for (Deployment d : managedDeployments)
      {
         if (d.isDeployed())
         {
View Full Code Here

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

      });
   }
  
   private void forEachManagedDeployment(Operation<Container, Deployment> operation) throws Exception
   {
      DeploymentScenario scenario = this.deploymentScenario.get();
      if(scenario == null)
      {
         return;
      }
      forEachDeployment(scenario.managedDeploymentsInDeployOrder(), operation);
   }
View Full Code Here

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

      forEachDeployment(scenario.managedDeploymentsInDeployOrder(), operation);
   }

   private void forEachDeployedDeployment(Operation<Container, Deployment> operation) throws Exception
   {
      DeploymentScenario scenario = this.deploymentScenario.get();
      if(scenario == null)
      {
         return;
      }
      forEachDeployment(scenario.deployedDeploymentsInUnDeployOrder(), operation);
   }
View Full Code Here

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

    * @see org.jboss.arquillian.api.Deployer#deploy(java.lang.String)
    */
   @Override
   public void deploy(String name)
   {
      DeploymentScenario scenario = deploymentScenario.get();
      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario in context");
      }
      ContainerRegistry registry = containerRegistry.get();
      if(registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }
     
      Deployment deployment = scenario.deployment(new DeploymentTargetDescription(name));
      if(deployment == null)
      {
         throw new IllegalArgumentException("No deployment in context found with name " + name);
      }
     
View Full Code Here

Examples of org.jboss.arquillian.spi.client.deployment.DeploymentScenario

{

   @Test
   public void shouldHandleMultipleDeploymentsAllDefault() throws Exception
   {
      DeploymentScenario scenario = new AnnotationDeploymentScenarioGenerator().generate(new TestClass(MultiDeploymentsDefault.class));
     
      Assert.assertNotNull(scenario);
      Assert.assertEquals(
            "Verify all deployments were found",
            2, scenario.getDeployments().size());
     
      for(DeploymentDescription deployment : scenario.getDeployments())
      {
         Assert.assertEquals(
               "Verify deployment has default target",
               TargetDescription.DEFAULT,
               deployment.getTarget());
View Full Code Here

Examples of org.jboss.arquillian.spi.client.deployment.DeploymentScenario

   }
  
   @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());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.