Examples of ContainerRegistry


Examples of org.jboss.arquillian.container.spi.ContainerRegistry

      DeploymentScenario scenario = deploymentScenario.get();
      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario in context");
      }
      ContainerRegistry registry = containerRegistry.get();
      if(registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }
     
      Deployment deployment = scenario.deployment(new DeploymentTargetDescription(name));
      if(deployment == null)
      {
         throw new IllegalArgumentException("No deployment in context found with name " + name);
      }
     
      if (deployment.getDescription().managed())
      {
         throw new IllegalArgumentException("Could not deploy " + name + " deployment. The deployment is controlled by Arquillian");
      }
     
      Container container = registry.getContainer(deployment.getDescription().getTarget());
     
      if (!container.getState().equals(State.STARTED))
      {
         throw new IllegalArgumentException("Deployment with name " + name + " could not be undeployed. Container " +
            container.getName() + " must be still running.");
View Full Code Here

Examples of org.jboss.arquillian.container.spi.ContainerRegistry

   // Validate DeploymentScenario --------------------------------------------------------||
   //-------------------------------------------------------------------------------------||

   protected void validate(DeploymentScenario scenario)
   {
      ContainerRegistry conReg = containerRegistry.get();
      for (TargetDescription target : scenario.targets())
      {
         Container container = conReg.getContainer(target);
         if (container == null)
         {
            throwTargetNotFoundValidationException(conReg, target);
         }
      }

      for(Deployment deployment : scenario.deployments())
      {
         Container container = conReg.getContainer(deployment.getDescription().getTarget());
         if("custom".equalsIgnoreCase(container.getContainerConfiguration().getMode()))
         {
            if(deployment.getDescription().managed())
            {
               throw new ValidationException(
View Full Code Here

Examples of org.jboss.arquillian.impl.domain.ContainerRegistry

   }
  
   private void forEachContainer(Operation<Container> operation) throws Exception
   {
      injector.get().inject(operation);
      ContainerRegistry registry = containerRegistry.get();
      for(Container container : registry.getContainers())
      {
         operation.perform(container);
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.