Package org.jboss.arquillian.spi

Examples of org.jboss.arquillian.spi.Configuration


    * @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
   {
      Archive<?> deployment = context.get(Archive.class);
      Configuration configuration = context.get(Configuration.class);

      if (deployment != null && configuration != null && configuration.getDeploymentExportPath() != null)
      {
         // TODO: should prepping the export directory be in the configuration builder?
         String exportPath = configuration.getDeploymentExportPath();
         File exportDir = new File(exportPath);
         if (exportDir.isFile())
         {
            log.warning("Deployment export disabled. Export path points to an existing file: " + exportPath);
            return;
View Full Code Here


      }
   }
  
   private boolean shouldRestart(Context context)
   {
      Configuration configuration = context.get(Configuration.class);
      int maxDeployments = configuration == null ? -1:configuration.getMaxDeploymentsBeforeRestart();
      if(maxDeployments > -1)
      {
         if((maxDeployments -1 ) == deploymentCount)
         {
            deploymentCount = 0;
View Full Code Here

    * @see org.jboss.arquillian.impl.ConfigurationBuilder#build()
    */
   public Configuration build() throws ConfigurationException
   {     
      // the configuration object we are going to return
      Configuration configuration = new Configuration();
     
      Collection<ContainerConfiguration> containersConfigurations = serviceLoader.all(ContainerConfiguration.class);
      log.fine("Container Configurations: " + containersConfigurations.size());
     
      for(ContainerConfiguration containerConfiguration : containersConfigurations)
      {
         configuration.addContainerConfig(containerConfiguration);
      }

      try
      {
         Document arquillianConfiguration = loadArquillianConfiguration(resourcePath);
View Full Code Here

   private ConcurrentHashMap<Class<?>, ClassContext> classContextStore;
   private ConcurrentHashMap<Object, TestContext> testContextStore;
  
   public ContextLifecycleManager(ProfileBuilder profileBuilder, ServiceLoader serviceLoader)
   {
      this(new Configuration(), profileBuilder, serviceLoader);
   }
View Full Code Here

   {
      super(klass);
      lastCreatedRunner.set(this);
      if(deployableTest.get() == null)
      {
         Configuration configuration = new XmlConfigurationBuilder().build();
         deployableTest.set(DeployableTestBuilder.build(configuration));
         try
         {
            deployableTest.get().beforeSuite();
         }
View Full Code Here

    * @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
   {
      Archive<?> deployment = context.get(Archive.class);
      Configuration configuration = context.get(Configuration.class);
     
      if(deployment != null && (configuration != null && configuration.getDeploymentExportPath() != null))
      {
         deployment.as(ZipExporter.class).exportZip(
               new File(configuration.getDeploymentExportPath() + deployment.getName()),
               true);
      }
   }
View Full Code Here

    * @see org.jboss.arquillian.impl.ConfigurationBuilder#build()
    */
   public Configuration build() throws ConfigurationException
   {     
      // the configuration object we are going to return
      Configuration configuration = new Configuration();
     
      Collection<ContainerConfiguration> containersConfigurations = serviceLoader.all(ContainerConfiguration.class);
      log.fine("Container Configurations: " + containersConfigurations.size());
     
      for(ContainerConfiguration containerConfiguration : containersConfigurations)
      {
         configuration.addContainerConfig(containerConfiguration);
      }

      try
      {
         Document arquillianConfiguration = loadArquillianConfiguration(resourcePath);
View Full Code Here

            // no, initialization has been attempted before, refuse to do anything else
            if(lastCreatedRunner.get() != null)
            {
                throw new RuntimeException("Arquillian has previously been attempted initialized, but failed. See previous exceptions for cause.");
            }
            Configuration configuration = new XmlConfigurationBuilder().build();
            TestRunnerAdaptor adaptor = DeployableTestBuilder.build(configuration);
            try
            {
               // don't set it if beforeSuite fails
               adaptor.beforeSuite();
View Full Code Here

   private ConcurrentHashMap<Class<?>, ClassContext> classContextStore;
   private ConcurrentHashMap<Object, TestContext> testContextStore;
  
   public ContextLifecycleManager(ProfileBuilder profileBuilder, ServiceLoader serviceLoader)
   {
      this(new Configuration(), profileBuilder, serviceLoader);
   }
View Full Code Here

    * @see org.jboss.arquillian.impl.ConfigurationBuilder#build()
    */
   public Configuration build() throws ConfigurationException
   {
      // the configuration object we are going to return
      Configuration configuration = new Configuration();

      Collection<ContainerConfiguration> containersConfigurations = serviceLoader.all(ContainerConfiguration.class);
      log.fine("Container Configurations: " + containersConfigurations.size());

      for(ContainerConfiguration containerConfiguration : containersConfigurations)
      {
         configuration.addContainerConfig(containerConfiguration);
      }

      Collection<ExtensionConfiguration> extensionsConfigurations = serviceLoader.all(ExtensionConfiguration.class);
      log.fine("Extension Configurations: " + containersConfigurations.size());

      for(ExtensionConfiguration extensionConfiguration : extensionsConfigurations)
      {
         configuration.addExtensionConfig(extensionConfiguration);
      }

      try
      {
         Document arquillianConfiguration = loadArquillianConfiguration(resourcePath);
View Full Code Here

TOP

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

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.