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

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


   public void shouldReturnNullDefaultProtocolIfNotAdded() throws Exception
   {
      desc = create()
         .exportAsString();
     
      ArquillianDescriptor descriptor = create(desc);
      Assert.assertNull(descriptor.getDefaultProtocol());
   }
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_2);

      ArquillianDescriptor descriptor = create(desc);
      Assert.assertNotNull(descriptor.getDefaultProtocol());
      Assert.assertEquals(PROTOCOL_TYPE_1, descriptor.getDefaultProtocol().getType());
      Assert.assertEquals(1, descriptor.getDefaultProtocol().getProperties().size());
      Assert.assertEquals(PROPERTY_VALUE_2, descriptor.getDefaultProtocol().getProperties().get(PROPERTY_NAME_1));
   }
View Full Code Here

            .dependency(DEPENDENCY_1)
            .dependency(DEPENDENCY_2).exportAsString();
     
      assertXPath(desc, "/arquillian/container/dependencies/dependency", DEPENDENCY_1, DEPENDENCY_2);
     
      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(1, descriptor.getContainers().size());
      Assert.assertEquals(CONTAINER_NAME_1, descriptor.getContainers().get(0).getContainerName());
     
      Assert.assertEquals(DEPENDENCY_1, descriptor.getContainers().get(0).getDependencies().get(0));
      Assert.assertEquals(DEPENDENCY_2, descriptor.getContainers().get(0).getDependencies().get(1));
   }
View Full Code Here

            .dependency(DEPENDENCY_1)
            .dependency(DEPENDENCY_1).exportAsString();
     
      assertXPath(desc, "/arquillian/container/dependencies/dependency", DEPENDENCY_1);

      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(1, descriptor.getContainers().size());
      Assert.assertEquals(CONTAINER_NAME_1, descriptor.getContainers().get(0).getContainerName());
      Assert.assertEquals(1, descriptor.getContainers().get(0).getDependencies().size());
      Assert.assertEquals(DEPENDENCY_1, descriptor.getContainers().get(0).getDependencies().get(0));
   }
View Full Code Here

      assertXPath(desc, "/arquillian/container/protocol[2]/@type", PROTOCOL_TYPE_2);
      assertXPath(desc, "/arquillian/container/protocol[2]/property/@name", PROPERTY_NAME_2);
      assertXPath(desc, "/arquillian/container/protocol[2]/property/text()", PROPERTY_VALUE_2);

      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(1, descriptor.getContainers().size());
      Assert.assertEquals(CONTAINER_NAME_1, descriptor.getContainers().get(0).getContainerName());
     
      Assert.assertEquals(2, descriptor.getContainers().get(0).getProtocols().size());
      Assert.assertEquals(PROTOCOL_TYPE_1, descriptor.getContainers().get(0).getProtocols().get(0).getType());
      Assert.assertEquals(PROPERTY_VALUE_1, descriptor.getContainers().get(0).getProtocols().get(0).getProtocolProperties().get(PROPERTY_NAME_1));
      Assert.assertEquals(PROTOCOL_TYPE_2, descriptor.getContainers().get(0).getProtocols().get(1).getType());
      Assert.assertEquals(PROPERTY_VALUE_2, descriptor.getContainers().get(0).getProtocols().get(1).getProtocolProperties().get(PROPERTY_NAME_2));
   }
View Full Code Here

      assertXPath(desc, "/arquillian/container/@qualifier", CONTAINER_NAME_1);
      assertXPath(desc, "/arquillian/container/protocol/@type", PROTOCOL_TYPE_1);
      assertXPath(desc, "/arquillian/container/protocol/property/@name", PROPERTY_NAME_1);
      assertXPath(desc, "/arquillian/container/protocol/property/text()", PROPERTY_VALUE_2);

      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(1, descriptor.getContainers().size());
      Assert.assertEquals(1, descriptor.getContainers().get(0).getProtocols().size());
      Assert.assertEquals(PROTOCOL_TYPE_1, descriptor.getContainers().get(0).getProtocols().get(0).getType());
      Assert.assertEquals(PROPERTY_VALUE_2, descriptor.getContainers().get(0).getProtocols().get(0).getProtocolProperties().get(PROPERTY_NAME_1));
   }
View Full Code Here

      assertXPath(desc, "/arquillian/container[2]/@qualifier", CONTAINER_NAME_2);
      assertXPath(desc, "/arquillian/container[2]/configuration/property/@name", PROPERTY_NAME_2);
      assertXPath(desc, "/arquillian/container[2]/configuration/property/text()", PROPERTY_VALUE_2);

      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(2, descriptor.getContainers().size());
      Assert.assertEquals(CONTAINER_NAME_1, descriptor.getContainers().get(0).getContainerName());
      Assert.assertEquals(PROPERTY_VALUE_1, descriptor.getContainers().get(0).getContainerProperties().get(PROPERTY_NAME_1));
      Assert.assertEquals(CONTAINER_NAME_2, descriptor.getContainers().get(1).getContainerName());
      Assert.assertEquals(PROPERTY_VALUE_2, descriptor.getContainers().get(1).getContainerProperties().get(PROPERTY_NAME_2));
   }
View Full Code Here

      assertXPath(desc, "/arquillian/container[1]/@qualifier", CONTAINER_NAME_1);
     
      assertXPath(desc, "/arquillian/container[1]/configuration/property/@name", PROPERTY_NAME_1);
      assertXPath(desc, "/arquillian/container[1]/configuration/property/text()", PROPERTY_VALUE_2);

      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(1, descriptor.getContainers().size());
      Assert.assertEquals(CONTAINER_NAME_1, descriptor.getContainers().get(0).getContainerName());
      Assert.assertEquals(1, descriptor.getContainers().get(0).getContainerProperties().size());
      Assert.assertEquals(PROPERTY_VALUE_2, descriptor.getContainers().get(0).getContainerProperties().get(PROPERTY_NAME_1));
   }
View Full Code Here

     
      assertXPath(desc, "/arquillian/group/@qualifier", GROUP_NAME_1, GROUP_NAME_2);
      assertXPath(desc, "/arquillian/group[1]/@default", true);
      assertXPath(desc, "/arquillian/group/container/@qualifier", CONTAINER_NAME_1, CONTAINER_NAME_2, CONTAINER_NAME_3);
     
      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(2, descriptor.getGroups().size());
      Assert.assertEquals(2, descriptor.getGroups().get(0).getGroupContainers().size());
      Assert.assertEquals(1, descriptor.getGroups().get(1).getGroupContainers().size());
      Assert.assertEquals(GROUP_NAME_1, descriptor.getGroups().get(0).getGroupName());
      Assert.assertEquals(CONTAINER_NAME_1, descriptor.getGroups().get(0).getGroupContainers().get(0).getContainerName());
      Assert.assertEquals(CONTAINER_NAME_2, descriptor.getGroups().get(0).getGroupContainers().get(1).getContainerName());
      Assert.assertEquals(GROUP_NAME_2, descriptor.getGroups().get(1).getGroupName());
      Assert.assertEquals(CONTAINER_NAME_3, descriptor.getGroups().get(1).getGroupContainers().get(0).getContainerName());
   }
View Full Code Here

            .exportAsString();
     
      assertXPath(desc, "/arquillian/group/@qualifier", GROUP_NAME_1);
      assertXPath(desc, "/arquillian/group/container/@qualifier", CONTAINER_NAME_1);
     
      ArquillianDescriptor descriptor = create(desc);
      Assert.assertEquals(1, descriptor.getGroups().size());
      Assert.assertEquals(1, descriptor.getGroups().get(0).getGroupContainers().size());
      Assert.assertEquals(CONTAINER_NAME_1, descriptor.getGroups().get(0).getGroupContainers().get(0).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.