Package org.jboss.arquillian.spi.client.test

Examples of org.jboss.arquillian.spi.client.test.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


   {
      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

     
      ContainerRegistry registry = new ContainerRegistry();
      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

     
      ContainerRegistry registry = new ContainerRegistry();
      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

      when(container1.getContainerName()).thenReturn(CONTAINER_1_NAME);
      when(serviceLoader.onlyOne(isA(ClassLoader.class), 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

      when(container1.getContainerName()).thenReturn(CONTAINER_1_NAME);
      when(container2.getContainerName()).thenReturn(CONTAINER_2_NAME);
     
      Archive<?> archive = ShrinkWrap.create(JavaArchive.class);
     
      scenario.addDeployment(new DeploymentDescription(DEPLOYMENT_1_NAME, archive).setTarget(new TargetDescription(CONTAINER_1_NAME)));
     
      // should use testable archive
      scenario.addDeployment(
            new DeploymentDescription(DEPLOYMENT_2_NAME, archive)
               .setTarget(new TargetDescription(CONTAINER_2_NAME))
               .setTestableArchive(archive));
     
      // should not be deployed during Managed deployments
      scenario.addDeployment(
            new DeploymentDescription(DEPLOYMENT_3_NAME, archive)
               .setTarget(new TargetDescription(CONTAINER_2_NAME))
               .shouldBeManaged(false));
     
      bind(SuiteScoped.class, ContainerRegistry.class, registry);
      bind(ClassScoped.class, DeploymentScenario.class, scenario);
     
View Full Code Here

     
      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());
      Assert.assertEquals(
            "Verify deployment has specified protocol",
            new ProtocolDescription("protocol-second"),
            deploymentTwo.getProtocol());
View Full Code Here

    * @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

    */
   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

Related Classes of org.jboss.arquillian.spi.client.test.TargetDescription

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.