Package org.jboss.arquillian.spi

Examples of org.jboss.arquillian.spi.ServiceLoader


    * @param profileBuilder
    * @return
    */
   public static TestRunnerAdaptor build(ProfileBuilder profileBuilder, Configuration configuration)
   {
      ServiceLoader serviceLoader = new DynamicServiceLoader();

      ContextLifecycleManager eventManager = new ContextLifecycleManager(
            configuration,
            new ServiceLoadableProfileBuilder(serviceLoader, profileBuilder),
            serviceLoader
View Full Code Here


    * @param profileBuilder
    * @return
    */
   public static TestRunnerAdaptor build(ProfileBuilder profileBuilder, Configuration configuration)
   {
      ServiceLoader serviceLoader = new DynamicServiceLoader();

      ContextLifecycleManager eventManager = new ContextLifecycleManager(
            configuration,
            profileBuilder,
            serviceLoader
View Full Code Here

   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.event.suite.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, ClassEvent event) throws Exception
   {
      ServiceLoader serviceLoader = context.getServiceLoader();
      DeploymentPackager packager = serviceLoader.onlyOne(DeploymentPackager.class);
     
      DeploymentGenerator generator = context.get(DeploymentGenerator.class);
      Validate.stateNotNull(generator, "No " + DeploymentGenerator.class.getName() + " found in context");
     
      TestDeployment deployment = generator.generate(event.getTestClass());
View Full Code Here

    * @return the argument values
    */
   public static Object[] enrich(Context context, Method method)
   {
      Object[] values = new Object[method.getParameterTypes().length];
      ServiceLoader serviceLoader = context.getServiceLoader();
      Collection<TestEnricher> enrichers = serviceLoader.all(TestEnricher.class);
      for (TestEnricher enricher : enrichers)
      {
         mergeValues(values, enricher.resolve(context, method));
      }
      return values;
View Full Code Here

   {
      Controlable controller = null;
      Deployer deployer = null;
     
      // TODO: lookup service loader impl from configuration
      ServiceLoader serviceLoader = new DynamicServiceLoader();
     
      if(DeployableTest.isInContainer())
      {
         controller = new InContainerContainer();
         deployer = new InContainerContainer();
      }
      else
      {
         DeployableContainer container = serviceLoader.onlyOne(DeployableContainer.class);
         // TODO: lookup controller / deployer from configuration
         controller = new ContainerController(container);
         deployer = new ContainerDeployer(container);
      }
View Full Code Here

      return build(DeployableTestBuilder.profile == null ? ContainerProfile.CLIENT:DeployableTestBuilder.profile);
   }
  
   public static TestRunnerAdaptor build(ContainerProfile profileType)
   {
      ServiceLoader serviceLoader = new DynamicServiceLoader();
      ManagerBuilder builder = ManagerBuilder.from()
         .context(SuiteContextImpl.class)
         .context(ClassContextImpl.class)
         .context(TestContextImpl.class)
         .context(ContainerContextImpl.class)
         .context(DeploymentContextImpl.class);
        
      List<Profile> profiles = new ArrayList<Profile>();
      profiles.add(new ArquillianProfile());
      profiles.addAll(serviceLoader.all(Profile.class));
     
      //Profile profile = serviceLoader.onlyOne(Profile.class, ArquillianProfile.class);
      for(Profile profile : profiles)
      {
         switch (profileType)
View Full Code Here

   private Instance<ServiceLoader> loader;

   public void createRegistry(@Observes ArquillianDescriptor event)
   {
      ContainerRegistry reg = new ContainerRegistry();
      ServiceLoader serviceLoader = loader.get();

      String activeConfiguration = getActivatedConfiguration();
      for(ContainerDef container : event.getContainers())
      {
         if(
               (activeConfiguration != null && activeConfiguration.equals(container.getContainerName())) ||
               (activeConfiguration == null && container.isDefault()))
         {
            reg.create(container, serviceLoader);           
         }
      }
      if(activeConfiguration != null)
      {
         for(GroupDef group : event.getGroups())
         {
            if(activeConfiguration.equals(group.getGroupName()))
            {
               for(ContainerDef container : group.getGroupContainers())
               {
                  reg.create(container, serviceLoader);
               }
            }
         }
      }
      else if(reg.getContainers().size() == 0)
      {
         try
         {
            DeployableContainer<?> deployableContainer = serviceLoader.onlyOne(DeployableContainer.class);
            if(deployableContainer != null)
            {
               reg.create(new ContainerDefImpl("arquillian.xml").setContainerName("default"), serviceLoader);
            }
         }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spi.ServiceLoader

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.