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

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


         {
            //when a container is manually controlled, the deployment is deployed automatically
            //once the container is manually started, not now
            if (! "manual".equals(container.getContainerConfiguration().getMode()))
            {
               event.fire(new DeployDeployment(container, deployment));
            }
         }
      });
   }
View Full Code Here


  
   @Test
   public void shouldSwallowExceptionIfExpected() 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))
               .setExpectedException(NullPointerException.class))));
   }
View Full Code Here

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

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

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

   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

      {
         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

         {
            //when a container is manually controlled, the deployment is deployed automatically
            //once the container is manually started, not now
            if (! "manual".equals(container.getContainerConfiguration().getMode()))
            {
               event.fire(new DeployDeployment(container, deployment));
            }
         }
      });
   }
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.