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

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


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


   public void shouldNotExportedIfDeploymentIsNotArchive() throws Exception
   {
      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

      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

   public void shouldSwallowExceptionIfExpected() throws Exception
   {
      TestExceptionDeployThrower.shouldThrow = new DeploymentException("Could not handle ba", new NullPointerException());
      fire(new DeployDeployment(
            container,
            new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
               .setExpectedException(NullPointerException.class)));
   }
View Full Code Here

      TestExceptionDeployThrower.shouldThrow = new DeploymentException("Could not handle ba", new IllegalArgumentException());
      Mockito.when(serviceLoader.all(DeploymentExceptionTransformer.class)).thenReturn(Arrays.asList(transformer));

      fire(new DeployDeployment(
            container,
            new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
            .setExpectedException(IllegalArgumentException.class)));
     
      Mockito.verify(transformer, Mockito.times(1)).transform(Mockito.isA(Exception.class));
   }
View Full Code Here

      Mockito.when(serviceLoader.all(DeploymentExceptionTransformer.class)).thenReturn(Arrays.asList(transformer));
      Mockito.when(transformer.transform(TestExceptionDeployThrower.shouldThrow)).thenReturn(new IllegalArgumentException());

      fire(new DeployDeployment(
            container,
            new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
               .setExpectedException(IllegalArgumentException.class)));
   }
View Full Code Here

      TestExceptionDeployThrower.shouldThrow = new DeploymentException("Could not handle ba", new NullPointerException());
      Mockito.when(serviceLoader.all(DeploymentExceptionTransformer.class)).thenReturn(Arrays.asList(transformer));

      fire(new DeployDeployment(
            container,
            new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
               .setExpectedException(IllegalArgumentException.class)));
      }
View Full Code Here

   {
      TestExceptionDeployThrower.shouldThrow = new DeploymentException("Could not handle ba", new NullPointerException());

      fire(new DeployDeployment(
            container,
            new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))));
   }
View Full Code Here

   {
      TestExceptionDeployThrower.shouldThrow = null;

      fire(new DeployDeployment(
            container,
            new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
               .setExpectedException(IllegalArgumentException.class)));
   }
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

TOP

Related Classes of org.jboss.arquillian.spi.client.deployment.DeploymentDescription

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.