Examples of TargetDescription


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

      when(container1.getContainerName()).thenReturn(CONTAINER_1_NAME);
      when(container2.getContainerName()).thenReturn(CONTAINER_2_NAME);
     
      scenario.addDeployment(
            new DeploymentDescription(DEPLOYMENT_1_NAME, ShrinkWrap.create(JavaArchive.class))
               .setTarget(new TargetDescription(CONTAINER_1_NAME))
               .shouldBeTestable(false)
               .setOrder(2));
     
      // should use testable archive
      scenario.addDeployment(
            new DeploymentDescription(DEPLOYMENT_2_NAME, ShrinkWrap.create(JavaArchive.class))
               .setTarget(new TargetDescription(CONTAINER_2_NAME))
               .setOrder(1)
               .shouldBeTestable(true)
               .setTestableArchive(ShrinkWrap.create(JavaArchive.class)));
     
      // should not be deployed during Managed deployments
      scenario.addDeployment(
            new DeploymentDescription(DEPLOYMENT_3_NAME, ShrinkWrap.create(JavaArchive.class))
               .setTarget(new TargetDescription(CONTAINER_2_NAME))
               .setOrder(3)
               .shouldBeTestable(false)
               .shouldBeManaged(false));
     
      scenario.addDeployment(
            new DeploymentDescription(DEPLOYMENT_4_NAME, Descriptors.create(BeansDescriptor.class))
               .setTarget(new TargetDescription(CONTAINER_1_NAME))
               .setOrder(4)
               .shouldBeManaged(true));
     
      registry = new LocalContainerRegistry(injector.get());
     
View Full Code Here

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

      ContainerRegistry registry = new LocalContainerRegistry(injector.get());
      registry.create(new ContainerDefImpl(ARQUILLIAN_XML).setContainerName(name)
                           .property("property", prop), serviceLoader);

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

      Assert.assertEquals(
            "Verify that the only registered container is returned as default",
            name, container.getName());
View Full Code Here

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

      ContainerRegistry registry = new LocalContainerRegistry(injector.get());
      registry.create(new ContainerDefImpl(ARQUILLIAN_XML).setContainerName(name)
                           .property("property", prop), serviceLoader);

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

      Assert.assertEquals(
            "Verify that the only registered container is returned as default",
            name, container.getName());
View Full Code Here

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

     
      ContainerRegistry registry = new LocalContainerRegistry(injector.get());
      registry.create(new ContainerDefImpl(ARQUILLIAN_XML).setContainerName("other-name"), serviceLoader);
      registry.create(new ContainerDefImpl(ARQUILLIAN_XML).setContainerName(name), serviceLoader);
     
      Container container = registry.getContainer(new TargetDescription(name));
     
      Assert.assertEquals(
            "Verify that the specific registered container is returned",
            name, container.getName());
   }
View Full Code Here

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

   public void createDeployment()
   {
      Archive<?> archive = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME).addClass(getClass());

      deployment = new DeploymentDescription(DEPLOYMENT_NAME, archive);
      deployment.setTarget(new TargetDescription(TARGET_NAME));
      deployment.setTestableArchive(archive);
   }
View Full Code Here

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

   {
      bind(ApplicationScoped.class, ArquillianDescriptor.class, Descriptors.create(ArquillianDescriptor.class).engine()
            .deploymentExportPath(EXPORT_PATH));

      deployment = new DeploymentDescription(DEPLOYMENT_NAME, Descriptors.create(WebAppDescriptor.class));
      deployment.setTarget(new TargetDescription(TARGET_NAME));
     
      fire(new BeforeDeploy(deployableContainer, deployment));

      fileShouldExist(false);
   }
View Full Code Here

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

   public void createDeployment()
   {
      Archive<?> archive = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME).addClass(getClass());

      deployment = new DeploymentDescription(DEPLOYMENT_NAME, archive);
      deployment.setTarget(new TargetDescription(TARGET_NAME));
      deployment.setTestableArchive(archive);
   }
View Full Code Here

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

   {
      bind(ApplicationScoped.class, ArquillianDescriptor.class, Descriptors.create(ArquillianDescriptor.class).engine()
            .deploymentExportPath(EXPORT_PATH));

      deployment = new DeploymentDescription(DEPLOYMENT_NAME, Descriptors.create(WebAppDescriptor.class));
      deployment.setTarget(new TargetDescription(TARGET_NAME));
     
      fire(new BeforeDeploy(deployableContainer, deployment));

      fileShouldExist(false);
   }
View Full Code Here

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

    * @param deploymentMethod
    * @return
    */
   private DeploymentDescription generateDeployment(Method deploymentMethod)
   {
      TargetDescription target = generateTarget(deploymentMethod);
      ProtocolDescription protocol = generateProtocol(deploymentMethod);
     
      Deployment deploymentAnnotation = deploymentMethod.getAnnotation(Deployment.class);
      DeploymentDescription deployment = null;
      if(Archive.class.isAssignableFrom(deploymentMethod.getReturnType()))
View Full Code Here

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

    */
   private TargetDescription generateTarget(Method deploymentMethod)
   {
      if(deploymentMethod.isAnnotationPresent(TargetsContainer.class))
      {
         return new TargetDescription(deploymentMethod.getAnnotation(TargetsContainer.class).value());
      }
      return TargetDescription.DEFAULT;
   }
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.