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

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentScenario


   public void generateDeployment(@Observes GenerateDeployment event)
   {
      DeploymentScenarioGenerator generator = serviceLoader.get().onlyOne(
            DeploymentScenarioGenerator.class, AnnotationDeploymentScenarioGenerator.class);
     
      DeploymentScenario scenario = new DeploymentScenario();
     
      for(DeploymentDescription deployment : generator.generate(event.getTestClass()))
      {
         scenario.addDeployment(deployment);
      }

      validate(scenario);
      createTestableDeployments(scenario, event.getTestClass());
View Full Code Here


      });
   }
  
   private void forEachManagedDeployment(Operation<Container, Deployment> operation) throws Exception
   {
      DeploymentScenario scenario = this.deploymentScenario.get();
      forEachDeployment(scenario.managedDeploymentsInDeployOrder(), operation);
   }
View Full Code Here

      forEachDeployment(scenario.managedDeploymentsInDeployOrder(), operation);
   }

   private void forEachDeployedDeployment(Operation<Container, Deployment> operation) throws Exception
   {
      DeploymentScenario scenario = this.deploymentScenario.get();
      forEachDeployment(scenario.deployedDeploymentsInUnDeployOrder(), operation);
   }
View Full Code Here

      registry.create(suiteContainerDef, serviceLoader);
      registry.create(manualContainerDef, serviceLoader);
      registry.create(customContainerDef, serviceLoader);

      bind(ApplicationScoped.class, ContainerRegistry.class, registry);
      bind(ApplicationScoped.class, DeploymentScenario.class, new DeploymentScenario());

      fire(new SetupContainers());
   }
View Full Code Here

      Mockito.when(reg.getContainer("_DEFAULT_")).thenReturn(container);
      Mockito.when(reg.getContainer("_CONTAINER_STOPPED_")).thenReturn(containerStopped);
      Mockito.when(reg.getContainer(new TargetDescription("_DEFAULT_"))).thenReturn(container);
      Mockito.when(reg.getContainer(new TargetDescription("_CONTAINER_STOPPED_"))).thenReturn(containerStopped);
     
      bind(ApplicationScoped.class, DeploymentScenario.class, new DeploymentScenario());
      bind(ApplicationScoped.class, ContainerRegistry.class, reg);

      fire(new SetupContainers()); // binds the Deployer
   }
View Full Code Here

      fire(createEvent(DeploymentWithDefaults.class));

      CallMap spi = getManager().resolve(CallMap.class);
      Assert.assertTrue(spi.wasCalled(AuxiliaryArchiveAppender.class));

      DeploymentScenario scenario = getManager().resolve(DeploymentScenario.class);
      Assert.assertEquals(1, scenario.deployments().size());

      ArgumentCaptor<TestDeployment> captor = ArgumentCaptor.forClass(TestDeployment.class);
      verify(packager).generateDeployment(captor.capture(), Mockito.any(Collection.class));

      Assert.assertEquals(0, captor.getValue().getAuxiliaryArchives().size());
View Full Code Here

      }
   }

   private void verifyScenario(String... names)
   {
      DeploymentScenario scenario = getManager().resolve(DeploymentScenario.class);
      Assert.assertEquals(names.length, scenario.deployments().size());
     
      for(int i = 0; i < names.length; i++)
      {
         contains(scenario.deployments(), names[i]);
      }
   }
View Full Code Here

   @Test
   public void shouldNotInvokeTestInContainerDeploymentContextIfNoDeploymentFound() throws Exception
   {
      // override previous bound DeploymentScenario with a empty set
      bind(ClassScoped.class, DeploymentScenario.class, new DeploymentScenario());
      fire(new org.jboss.arquillian.test.spi.event.suite.Test(new TestMethodExecutor()
      {
         @Override
         public void invoke(Object... parameters) throws Throwable { }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.client.deployment.DeploymentScenario

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.