Package org.jboss.arquillian.impl.core

Examples of org.jboss.arquillian.impl.core.ManagerBuilder


   private ManagerImpl manager;
     
   @Before
   public final void create()
   {
      ManagerBuilder builder = ManagerBuilder.from();
      addContexts(builder);
      builder.extension(EventRegisterObserver.class);
      addExtensions(builder);
      manager = builder.create();
     
      manager.resolve(Injector.class).inject(this);
      startContexts(manager);
   }
View Full Code Here


   }
  
   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)
         {
            case CLIENT :
               builder.extensions(profile.getClientProfile().toArray(new Class<?>[0]));
               break;
            case CONTAINER :
               builder.extensions(profile.getContainerProfile().toArray(new Class<?>[0]));
               break;
         }
      }
      return new EventTestRunnerAdaptor(builder.create());    
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.impl.core.ManagerBuilder

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.