Package org.jboss.arquillian.impl.client.container.event

Examples of org.jboss.arquillian.impl.client.container.event.DeployDeployment


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


   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 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 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 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 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 DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
               .setExpectedException(IllegalArgumentException.class)));
   }
View Full Code Here

         private Event<DeploymentEvent> event;
        
         @Override
         public void perform(Container container, DeploymentDescription deployment) throws Exception
         {
            event.fire(new DeployDeployment(container, deployment));           
         }
      });
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.impl.client.container.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.