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

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


       
        boolean contextActivated = false;
        OperateOnDeployment deploymentSpecifier = getOperateOnDeployment(qualifiers);
        Deployment specificDeployment = null;
        if (deploymentSpecifier != null) {
            specificDeployment = scenario.deployment(new DeploymentTargetDescription(deploymentSpecifier.value()));
            if (specificDeployment == null) {
                throw new IllegalArgumentException("@" + OperateOnDeployment.class.getSimpleName() + " specified an unknown deployment '" + deploymentSpecifier.value());
            }
           
            deploymentContext.get().activate(specificDeployment);
View Full Code Here


      verify(deployableContainer1, times(1)).deploy(isA(Descriptor.class));
      verify(deployableContainer2, times(1)).deploy(isA(Archive.class));

      InOrder ordered = inOrder(deployableContainer1, deployableContainer2);
      ordered.verify(deployableContainer2, times(1)).deploy(
            scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_2_NAME)).getDescription().getTestableArchive());
     
      ordered.verify(deployableContainer1, times(1)).deploy(
            scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_1_NAME)).getDescription().getArchive());
     
      ordered.verify(deployableContainer1, times(1)).deploy(
            scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_4_NAME)).getDescription().getDescriptor());
   }
View Full Code Here

   {
      registry.create(container1, serviceLoader).setState(State.STARTED);
      registry.create(container2, serviceLoader).setState(State.STARTED);
     
      // setup all deployment as deployed so that we can observe UnDeployDeployment events
      scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_1_NAME)).deployed();
      scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_2_NAME)).deployed();
      scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_3_NAME)).deployed();
      scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_4_NAME)).deployed();
     
      fire(new UnDeployManagedDeployments());
     
      assertEventFired(UnDeployDeployment.class, 4);
      assertEventFiredInContext(UnDeployDeployment.class, ContainerContext.class);
      assertEventFiredInContext(UnDeployDeployment.class, DeploymentContext.class);

      assertEventFired(BeforeUnDeploy.class, 4);
      assertEventFiredInContext(BeforeUnDeploy.class, ContainerContext.class);
      assertEventFiredInContext(BeforeUnDeploy.class, DeploymentContext.class);

      assertEventFired(AfterUnDeploy.class, 4);
      assertEventFiredInContext(AfterUnDeploy.class, ContainerContext.class);
      assertEventFiredInContext(AfterUnDeploy.class, DeploymentContext.class);

      verify(deployableContainer1, times(1)).undeploy(isA(Archive.class));
      verify(deployableContainer1, times(1)).undeploy(isA(Descriptor.class));
      verify(deployableContainer2, times(2)).undeploy(isA(Archive.class));
     

      InOrder ordered = inOrder(deployableContainer1, deployableContainer2);
      ordered.verify(deployableContainer1, times(1)).undeploy(
            scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_4_NAME)).getDescription().getDescriptor());

      ordered.verify(deployableContainer2, times(1)).undeploy(
            scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_3_NAME)).getDescription().getArchive());

      ordered.verify(deployableContainer1, times(1)).undeploy(
            scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_1_NAME)).getDescription().getArchive());

      ordered.verify(deployableContainer2, times(1)).undeploy(
            scenario.deployment(new DeploymentTargetDescription(DEPLOYMENT_2_NAME)).getDescription().getTestableArchive());
   }
View Full Code Here

    * common metadata layer.
    */

   private void lookup(Method method, ResultCallback callback)
   {
      DeploymentTargetDescription deploymentTarget = locateDeployment(method);
     
      ContainerRegistry containerRegistry = this.containerRegistry.get();
      DeploymentScenario deploymentScenario = this.deploymentScenario.get();
     
      Deployment deployment = deploymentScenario.deployment(deploymentTarget);
View Full Code Here

   }
  
   // TODO: Needs to be extracted into a MetaModel layer. Should not do reflection directly on TestClass/TestMethods
   private DeploymentTargetDescription locateDeployment(Method method)
   {
      DeploymentTargetDescription target = null;
      if(method.isAnnotationPresent(OperateOnDeployment.class))
      {
         target = new DeploymentTargetDescription(method.getAnnotation(OperateOnDeployment.class).value());
      }
      else
      {
         target = DeploymentTargetDescription.DEFAULT;
      }
View Full Code Here

    * common metadata layer.
    */

   private void lookup(Method method, ResultCallback callback)
   {
      DeploymentTargetDescription deploymentTarget = locateDeployment(method);
     
      ContainerRegistry containerRegistry = this.containerRegistry.get();
      DeploymentScenario deploymentScenario = this.deploymentScenario.get();
     
      Deployment deployment = deploymentScenario.deployment(deploymentTarget);
View Full Code Here

   }
  
   // TODO: Needs to be extracted into a MetaModel layer. Should not do reflection directly on TestClass/TestMethods
   private DeploymentTargetDescription locateDeployment(Method method)
   {
      DeploymentTargetDescription target = null;
      if(method.isAnnotationPresent(OperateOnDeployment.class))
      {
         target = new DeploymentTargetDescription(method.getAnnotation(OperateOnDeployment.class).value());
      }
      else
      {
         target = DeploymentTargetDescription.DEFAULT;
      }
View Full Code Here

      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

      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);
      }
      Container container = registry.getContainer(deployment.getDescription().getTarget());
View Full Code Here

      DeploymentScenario scenario = deploymentScenario.get();
      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario 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

TOP

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

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.