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

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


                        {
                           @Override
                           public void validate()
                           {
                              registrar.loadConfiguration(new ManagerStarted());
                              ArquillianDescriptor desc = descInst.get();

                              Assert.assertEquals(1, desc.getContainers().size());
                              Assert.assertEquals("A", desc.getContainers().get(0).getContainerName());
                              Assert.assertEquals("suite", desc.getContainers().get(0).getMode());
                           }
                        });
               }
            });
   }
View Full Code Here


                        {
                           @Override
                           public void validate()
                           {
                              registrar.loadConfiguration(new ManagerStarted());
                              ArquillianDescriptor desc = descInst.get();

                              Assert.assertEquals(2, desc.getContainers().size());
                              Assert.assertEquals("A", desc.getContainers().get(0).getContainerName());
                              Assert.assertEquals("B", desc.getContainers().get(1).getContainerName());
                           }
                        });
               }
            });
   }
View Full Code Here

                        {
                           @Override
                           public void validate()
                           {
                              registrar.loadConfiguration(new ManagerStarted());
                              ArquillianDescriptor desc = descInst.get();

                              Assert.assertEquals(1, desc.getContainers().size());
                              Assert.assertEquals("A", desc.getContainers().get(0).getContainerName());
                              Assert.assertEquals("suite", desc.getContainers().get(0).getMode());
                           }
                        });
               }
            });
   }
View Full Code Here

   @Inject
   private Instance<ArquillianDescriptor> configuration;
  
   public void callback(@Observes BeforeDeploy event) throws Exception
   {
      ArquillianDescriptor descriptor = configuration.get();
      if(descriptor == null)
      {
         return;
      }
      EngineDef engine = descriptor.engine();

      String systemExport = SecurityActions.getProperty("arquillian.deploymentExportPath");
      String systemExportExploded = SecurityActions.getProperty("arquillian.deploymentExportExploded");
      String exportPath = (systemExport == null || systemExport.length() == 0) ? engine.getDeploymentExportPath():systemExport;
      Boolean exportExploded = (systemExportExploded == null || systemExportExploded.length() == 0) ? engine.getDeploymentExportExploded():Boolean.parseBoolean(systemExport);
View Full Code Here

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

      return newArqDescriptor;
   }
View Full Code Here

   public void loadConfiguration(@Observes ManagerStarted event)
   {
      final InputStream input = FileUtils.loadArquillianXml(ARQUILLIAN_XML_PROPERTY, ARQUILLIAN_XML_DEFAULT);

      final ArquillianDescriptor descriptor = resolveDescriptor(input);

      final ArquillianDescriptor resolvedDesc = resolveSystemProperties(descriptor);

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

      descriptorInst.set(resolvedDesc);
   }

   private ArquillianDescriptor resolveDescriptor(final InputStream input)
   {
      final ArquillianDescriptor descriptor;

      if(input != null)
      {
         descriptor = Descriptors.importAs(ArquillianDescriptor.class)
                                          .fromStream(input);
View Full Code Here

   @Inject @ApplicationScoped
   private InstanceProducer<ArquillianDescriptor> descriptorInst;

   public void loadConfiguration(@Observes ManagerStarted event)
   {
      ArquillianDescriptor descriptor;
     
      InputStream input = loadArquillianXml();
      if(input != null)
      {
         descriptor = Descriptors.importAs(ArquillianDescriptor.class)
                                          .from(input);
      }
      else
      {
         descriptor = Descriptors.create(ArquillianDescriptor.class);
      }
     
      final ArquillianDescriptor resolvedDesc = ConfigurationSysPropResolver.resolveSystemProperties(descriptor);
      descriptorInst.set(resolvedDesc);
   }
View Full Code Here

            .exportAsString();
     
      assertXPath(desc, "/arquillian/container/@qualifier", CONTAINER_NAME_2);
      assertXPath(desc, "/arquillian/container/@default", "true");

      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(1, descriptor.getContainers().size());
      Assert.assertEquals(CONTAINER_NAME_2, descriptor.getContainers().get(0).getContainerName());
      Assert.assertTrue(descriptor.getContainers().get(0).isDefault());
   }
View Full Code Here

     
      assertXPath(desc, "/arquillian/defaultProtocol/@type", PROTOCOL_TYPE_1);
      assertXPath(desc, "/arquillian/defaultProtocol/property/@name", PROPERTY_NAME_1);
      assertXPath(desc, "/arquillian/defaultProtocol/property/text()", PROPERTY_VALUE_1);
     
      ArquillianDescriptor descriptor = create(desc);
      Assert.assertNotNull(descriptor.getDefaultProtocol());
      Assert.assertEquals(PROTOCOL_TYPE_1, descriptor.getDefaultProtocol().getType());
      Assert.assertEquals(PROPERTY_VALUE_1, descriptor.getDefaultProtocol().getProperties().get(PROPERTY_NAME_1));
   }
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.