Package org.jboss.arquillian.config.descriptor.api

Examples of org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor


    }

    @SuppressWarnings({ "rawtypes", "unchecked" })
    private Object constructDrone(Method method, Class<?> type, Class<? extends Annotation> qualifier) {
        DroneRegistry regs = registry.get();
        ArquillianDescriptor desc = arquillianDescriptor.get();

        Configurator configurator = regs.getConfiguratorFor(type);
        Instantiator instantiator = regs.getInstantiatorFor(type);

        // store in map if not stored already
View Full Code Here


      }
   }
  
   private boolean shouldRestart()
   {
      ArquillianDescriptor descriptor = configuration.get();
      Integer maxTestClasses = descriptor.engine().getMaxTestClassesBeforeRestart();
      if(maxTestClasses == null)
      {
         return false;
      }
      if(maxTestClasses > -1)
View Full Code Here

   }

   public void loadFromArquillianXml(String arquillianXmlFilename)
   {
      final InputStream arqXmlStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(arquillianXmlFilename);
      final ArquillianDescriptor arquillianDescriptor = Descriptors.importAs(ArquillianDescriptor.class).fromStream(arqXmlStream);
      createFrom(arquillianDescriptor);
   }
View Full Code Here

   }

   public void loadFromArquillianXml(String arquillianXmlFilename)
   {
      final InputStream arqXmlStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(arquillianXmlFilename);
      final ArquillianDescriptor arquillianDescriptor = Descriptors.importAs(ArquillianDescriptor.class).from(arqXmlStream);
      loadFrom(arquillianDescriptor);
   }
View Full Code Here

   @Inject @ApplicationScoped
   private InstanceProducer<ArquillianDescriptor> descriptorInst;

   public void loadConfiguration(@Observes ManagerStarted event)
   {
      ArquillianDescriptor descriptor;

      final InputStream input = FileUtils.loadArquillianXml(ARQUILLIAN_XML_PROPERTY, ARQUILLIAN_XML_DEFAULT);
      if(input != null)
      {
         descriptor = Descriptors.importAs(ArquillianDescriptor.class)
                                          .fromStream(input);
      }
      else
      {
         descriptor = Descriptors.create(ArquillianDescriptor.class);
      }

      final ArquillianDescriptor resolvedDesc = trim(resolveSystemProperties(descriptor));

      new PropertiesParser().addProperties(
            resolvedDesc,
            FileUtils.loadArquillianProperties(ARQUILLIAN_PROP_PROPERTY, ARQUILLIAN_PROP_DEFAULT));
View Full Code Here

    */
   static ArquillianDescriptor resolveSystemProperties(final ArquillianDescriptor descriptor)
         throws IllegalArgumentException
   {
      final String descrStr = descriptor.exportAsString();
      final ArquillianDescriptor newArqDescriptor = Descriptors.importAs(ArquillianDescriptor.class).from(
            StringPropertyReplacer.replaceProperties(descrStr));

      return newArqDescriptor;
   }
View Full Code Here

   @Inject @ApplicationScoped
   private InstanceProducer<ArquillianDescriptor> descriptorInst;

   public void loadConfiguration(@Observes ManagerStarted event)
   {
      ArquillianDescriptor descriptor;
     
      InputStream input = FileUtils.loadArquillianXml(ARQUILLIAN_XML_PROPERTY, ARQUILLIAN_XML_DEFAULT);
      if(input != null)
      {
         descriptor = Descriptors.importAs(ArquillianDescriptor.class)
                                          .from(input);
      }
      else
      {
         descriptor = Descriptors.create(ArquillianDescriptor.class);
      }
     
      final ArquillianDescriptor resolvedDesc = ConfigurationSysPropResolver.resolveSystemProperties(descriptor);

      new PropertiesParser().addProperties(
            resolvedDesc,
            FileUtils.loadArquillianProperties(ARQUILLIAN_PROP_PROPERTY, ARQUILLIAN_PROP_DEFAULT));
View Full Code Here

      final String descString = desc.exportAsString();

      assertXPath(descString, "/arquillian/engine/property[@name='deploymentExportPath']/text()", PROPERTY_VALUE_1);
      assertXPath(descString, "/arquillian/engine/property[@name='maxTestClassesBeforeRestart']/text()", PROPERTY_INT_VALUE_1);  
  
      ArquillianDescriptor descriptor = create(descString);
     
      Assert.assertEquals(PROPERTY_VALUE_1, descriptor.engine().getDeploymentExportPath());
      Assert.assertEquals(PROPERTY_INT_VALUE_1, descriptor.engine().getMaxTestClassesBeforeRestart());
   }
View Full Code Here

      desc = create()
               .engine();
      desc = ConfigurationSysPropResolver.resolveSystemProperties(desc);
      final String descString = desc.exportAsString();

      ArquillianDescriptor descriptor = create(descString);
     
      Assert.assertNull(descriptor.engine().getDeploymentExportPath());
      Assert.assertNull(descriptor.engine().getMaxTestClassesBeforeRestart());
   }
View Full Code Here

      final String descString = desc.exportAsString();
     
      assertXPath(descString, "/arquillian/container/@qualifier", CONTAINER_NAME_1, CONTAINER_NAME_2);
      assertXPath(descString, "/arquillian/container[1]/@default", "true");
     
      ArquillianDescriptor descriptor = create(descString);
      Assert.assertEquals(2, descriptor.getContainers().size());
      Assert.assertEquals(CONTAINER_NAME_1, descriptor.getContainers().get(0).getContainerName());
      Assert.assertTrue(descriptor.getContainers().get(0).isDefault());
      Assert.assertEquals(CONTAINER_NAME_2, descriptor.getContainers().get(1).getContainerName());
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor

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.