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

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


      assertXPath(desc, "/arquillian/extension[1]/property[2]/text()", PROPERTY_VALUE_2);
     
      assertXPath(desc, "/arquillian/extension[2]/property/@name", PROPERTY_NAME_3);
      assertXPath(desc, "/arquillian/extension[2]/property/text()", PROPERTY_VALUE_3);
     
      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(2, descriptor.getExtensions().size());
      Assert.assertEquals(EXTENSION_NAME_1, descriptor.getExtensions().get(0).getExtensionName());
      Assert.assertEquals(2, descriptor.getExtensions().get(0).getExtensionProperties().size());
      Assert.assertEquals(PROPERTY_VALUE_1, descriptor.getExtensions().get(0).getExtensionProperties().get(PROPERTY_NAME_1));
      Assert.assertEquals(PROPERTY_VALUE_2, descriptor.getExtensions().get(0).getExtensionProperties().get(PROPERTY_NAME_2));

      Assert.assertEquals(EXTENSION_NAME_2, descriptor.getExtensions().get(1).getExtensionName());
      Assert.assertEquals(1, descriptor.getExtensions().get(1).getExtensionProperties().size());
      Assert.assertEquals(PROPERTY_VALUE_3, descriptor.getExtensions().get(1).getExtensionProperties().get(PROPERTY_NAME_3));
   }
View Full Code Here


               .setExtensionName(EXTENSION_NAME_2)
            .exportAsString();
     
      assertXPath(desc, "/arquillian/extension/@qualifier", EXTENSION_NAME_2);
     
      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(1, descriptor.getExtensions().size());
      Assert.assertEquals(EXTENSION_NAME_2, descriptor.getExtensions().get(0).getExtensionName());
      Assert.assertEquals(1, descriptor.getExtensions().get(0).getExtensionProperties().size());
      Assert.assertEquals(PROPERTY_VALUE_1, descriptor.getExtensions().get(0).getExtensionProperties().get(PROPERTY_NAME_1));
   }
View Full Code Here

     
      assertXPath(desc, "/arquillian/extension/@qualifier", EXTENSION_NAME_1);
      assertXPath(desc, "/arquillian/extension/property/@name", PROPERTY_NAME_1);
      assertXPath(desc, "/arquillian/extension/property/text()", PROPERTY_VALUE_2);

      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(1, descriptor.getExtensions().size());
      Assert.assertEquals(EXTENSION_NAME_1, descriptor.getExtensions().get(0).getExtensionName());
      Assert.assertEquals(1, descriptor.getExtensions().get(0).getExtensionProperties().size());
      Assert.assertEquals(PROPERTY_VALUE_2, descriptor.getExtensions().get(0).getExtensionProperties().get(PROPERTY_NAME_1));
   }
View Full Code Here

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

      // add multiple times to see only one property added
      desc = create()
               .engine()
             .exportAsString();

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

            .container(CONTAINER_NAME_2).exportAsString();
     
      assertXPath(desc, "/arquillian/container/@qualifier", CONTAINER_NAME_1, CONTAINER_NAME_2);
      assertXPath(desc, "/arquillian/container[1]/@default", "true");
     
      ArquillianDescriptor descriptor = create(desc);
      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

   }

   public void loadFromArquillianXml(String arquillianXmlFilename)
   {
      final InputStream arqXmlStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(arquillianXmlFilename);
      final ArquillianDescriptor arquillianDescriptor = Descriptors.importAs(ArquillianDescriptor.class).fromStream(arqXmlStream);
      loadFrom(arquillianDescriptor);
   }
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

   }

   @Test
   public void shouldRestartContainerForEveryX() throws Exception
   {
      ArquillianDescriptor desc = Descriptors.create(ArquillianDescriptor.class)
            .engine().maxTestClassesBeforeRestart(5);

      bind(ApplicationScoped.class, ArquillianDescriptor.class, desc);
     
      for(int i = 0; i < 10; i++)
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.