Package org.jboss.arquillian.container.test.impl.domain

Examples of org.jboss.arquillian.container.test.impl.domain.ProtocolDefinition


         {
            continue;
         }
         List<Archive<?>> auxiliaryArchives = loadAuxiliaryArchives(description);
        
         ProtocolDefinition protocolDefinition = protoReg.getProtocol(description.getProtocol());
         if(protocolDefinition == null)
         {
            protocolDefinition = protoReg.getProtocol(
                  containerRegistry.get().getContainer(description.getTarget()).getDeployableContainer().getDefaultProtocol());
         }
         Protocol<?> protocol = protocolDefinition.getProtocol();
         DeploymentPackager packager = protocol.getPackager();

         Archive<?> applicationArchive = description.getArchive();
         applyApplicationProcessors(description.getArchive(), testCase);
         applyAuxiliaryProcessors(auxiliaryArchives);
View Full Code Here


      Protocol<?> protocol = mock(Protocol.class);
      when(protocol.getPackager()).thenReturn(packager);
      when(protocol.getDescription()).thenReturn(new ProtocolDescription(name));

      Map<String, String> config = Collections.emptyMap();
      return protocolRegistry.addProtocol(new ProtocolDefinition(protocol, config, shouldBeDefault))
         .getProtocol(new ProtocolDescription(name));
   }
View Full Code Here

      when(protocol.getDescription()).thenReturn(new ProtocolDescription(protocolName));
      when(serviceLoader.all(Protocol.class)).thenReturn(Arrays.asList((Protocol)protocol));

      fire(createDescriptor(protocolName));

      ProtocolDefinition protocol = verifyRegistryProtocol(protocolName);
      Assert.assertTrue(protocol.isDefaultProtocol());
   }
View Full Code Here

      String protocolName = "protocol";
      when(protocol.getDescription()).thenReturn(new ProtocolDescription(protocolName));
      when(serviceLoader.all(Protocol.class)).thenReturn(Arrays.asList((Protocol)protocol));

      fire(createDescriptor());
      ProtocolDefinition protocol = verifyRegistryProtocol(protocolName);
      Assert.assertFalse(protocol.isDefaultProtocol());
   }
View Full Code Here

   }

   private ProtocolDefinition verifyRegistryProtocol(String protocolName)
   {
      ProtocolRegistry registry = getManager().resolve(ProtocolRegistry.class);
      ProtocolDefinition registeredProtocol = registry.getProtocol(new ProtocolDescription(protocolName));
      Assert.assertNotNull(
            "Verify " + Protocol.class.getSimpleName() + " was registered",
            registeredProtocol);

      Assert.assertEquals(
            "Verify same protocol instance was registered",
            protocol, registeredProtocol.getProtocol());

      return registeredProtocol;
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.test.impl.domain.ProtocolDefinition

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.