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

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


    * 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);
      if(deployment == null && deploymentTarget != DeploymentTargetDescription.DEFAULT)
      {
         // trying to operate on a non existing DeploymentTarget (which is not the DEFAULT)
         throw new IllegalStateException(
               "No deployment found in " + DeploymentScenario.class.getSimpleName() + " for defined target: " + deploymentTarget.getName() + ". " +
               "Please verify that the @" + OperateOnDeployment.class.getSimpleName() + " annotation on method " + method.getName() + " match a defined " +
               "@" + org.jboss.arquillian.container.test.api.Deployment.class.getSimpleName() + ".name");
      }
      if(deployment != null)
      {
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

      scenario.addDeployment(
            new DeploymentDescription("B", Descriptors.create(BeansDescriptor.class))
            .setTarget(TargetDescription.DEFAULT));


      DeploymentDescription deployment = scenario.deployment(new DeploymentTargetDescription("B")).getDescription();
     
      Assert.assertEquals("B", deployment.getName());
   }
View Full Code Here

      scenario.addDeployment(
            new DeploymentDescription("B", Descriptors.create(BeansDescriptor.class))
            .setTarget(TargetDescription.DEFAULT));


      Deployment deployment = scenario.deployment(new DeploymentTargetDescription("C"));
     
      Assert.assertNull(deployment);
   }
View Full Code Here

            .setTarget(TargetDescription.DEFAULT));
      scenario.addDeployment(
            new DeploymentDescription("A", Descriptors.create(BeansDescriptor.class))
            .setTarget(TargetDescription.DEFAULT));

      Deployment deployment = scenario.deployment(new DeploymentTargetDescription("A"));

      // will default to Archive
      Assert.assertEquals("A", deployment.getDescription().getName());
      Assert.assertTrue(deployment.getDescription().isArchiveDeployment());
   }
View Full Code Here

            .setTarget(TargetDescription.DEFAULT));
      scenario.addDeployment(
            new DeploymentDescription("A", ShrinkWrap.create(JavaArchive.class))
            .setTarget(TargetDescription.DEFAULT));

      Deployment deployment = scenario.deployment(new DeploymentTargetDescription("A"));

      // will default to Archive
      Assert.assertEquals("A", deployment.getDescription().getName());
      Assert.assertTrue(deployment.getDescription().isArchiveDeployment());
   }
View Full Code Here

            {
               throw new IllegalStateException("No " + DeploymentScenario.class.getSimpleName() + " found. " +
                     "Possible cause, @" + OperateOnDeployment.class.getSimpleName() + " is currently only supported on the client side. (@" + RunAsClient.class.getSimpleName() + ")");
            }
            OperateOnDeployment operatesOn = getOperatesOnDeployment(qualifiers);
            deployment = scenario.deployment(new DeploymentTargetDescription(operatesOn.value()));
            if(deployment == null)
            {
               throw new IllegalArgumentException(
                     "Could not operate on deployment (@" + OperateOnDeployment.class.getSimpleName() + "), " +
                     "no deployment found with name: " + operatesOn.value());
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);
      if(deployment == null && deploymentTarget != DeploymentTargetDescription.DEFAULT)
      {
         // trying to operate on a non existing DeploymentTarget (which is not the DEFAULT)
         throw new IllegalStateException(
               "No deployment found in " + DeploymentScenario.class.getSimpleName() + " for defined target: " + deploymentTarget.getName() + ". " +
               "Please verify that the @" + OperateOnDeployment.class.getSimpleName() + " annotation on method " + method.getName() + " match a defined " +
               "@" + org.jboss.arquillian.container.test.api.Deployment.class.getSimpleName() + ".name");
      }
      if(deployment != null)
      {
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

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.