Package org.jboss.arquillian.container.spi.event

Examples of org.jboss.arquillian.container.spi.event.DeployDeployment


   public void shouldRethrowExceptionIfWrongExpectedType() throws Exception
   {
      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 Deployment(new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
               .setExpectedException(IllegalArgumentException.class))));
      }
View Full Code Here


   @Test(expected = DeploymentException.class)
   public void shouldRethrowExceptionIfExpectedNotSet() throws Exception
   {
      TestExceptionDeployThrower.shouldThrow = new DeploymentException("Could not handle ba", new NullPointerException());

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

   @Test(expected = RuntimeException.class)
   public void shouldThrowExceptionIfExpectedButNoExceptionThrown() throws Exception
   {
      TestExceptionDeployThrower.shouldThrow = null;

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

         throw new IllegalArgumentException("No deployment in context found with name " + name);
      }
     
      Container container = registry.getContainer(deployment.getDescription().getTarget());
     
      event.fire(new DeployDeployment(container, deployment));
   }
View Full Code Here

      {
         if (!d.isDeployed())
         {
            log.info("Automatic deploying of the managed deployment with name " + d.getDescription().getName() +
               " for the container with name " + container.getName());
            event.fire(new DeployDeployment(container, d));
         }
      }
   }
View Full Code Here

      {
         if (!d.isDeployed())
         {
            log.info("Automatic deploying of the managed deployment with name " + d.getDescription().getName() +
               " for the container with name " + container.getName());
            event.fire(new DeployDeployment(container, d));
         }
      }
   }
View Full Code Here

    @SuppressWarnings("UnusedDeclaration")
    public void onDeploy(@Observes(precedence = -1) EventContext<DeployDeployment> eventContext, TestClass testClass)
    {
        tempDirectory = ShrinkWrapUtil.createTempDirectory(getTempDirectory());
        final DeployDeployment event = eventContext.getEvent();
        final Deployment deployment = event.getDeployment();
        Archive<?> testableArchive = deployment.getDescription().getTestableArchive();
        Archive<?> archive = deployment.getDescription().getArchive();
        final File explodedDeploymentDirectory = new File(
            tempDirectory + File.separator + testClass.getJavaClass().getCanonicalName() + File.separator + event.getContainer().getName());

        final Archive<?> explodableArchive = getExplodableArchive(testableArchive, archive);

        final File mainArchiveDirectory = new File(explodedDeploymentDirectory, explodableArchive.getName());
        final String mainArchivePath = mainArchiveDirectory.getAbsolutePath();
View Full Code Here

         }
         if (!d.isDeployed())
         {
            log.info("Automatic deploying of the managed deployment with name " + d.getDescription().getName() +
               " for the container with name " + container.getName());
            event.fire(new DeployDeployment(container, d));
         }
      }
   }
View Full Code Here

      {
         if (!d.isDeployed())
         {
            log.info("Automatic deploying of the managed deployment with name " + d.getDescription().getName() +
               " for the container with name " + container.getName());
            event.fire(new DeployDeployment(container, d));
         }
      }
   }
View Full Code Here

        public void deploy(@Observes final AfterStart event, final ContainerRegistry registry) {
            executeInClassScope(new Callable<Void>() {
                public Void call() throws Exception {
                    for (Deployment d : suiteDeploymentScenario.deployments()) {
                        deploymentEvent.fire(new DeployDeployment(findContainer(registry, event.getDeployableContainer()), d));
                    }
                    return null;
                }
            });
        }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.event.DeployDeployment

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.