Package org.jboss.arquillian.container.spi.client.deployment

Examples of org.jboss.arquillian.container.spi.client.deployment.TargetDescription


    * @param deploymentMethod
    * @return
    */
   private DeploymentDescription generateDeployment(Method deploymentMethod)
   {
      TargetDescription target = generateTarget(deploymentMethod);
      ProtocolDescription protocol = generateProtocol(deploymentMethod);

      Deployment deploymentAnnotation = deploymentMethod.getAnnotation(Deployment.class);
      DeploymentDescription description = null;
      if (Archive.class.isAssignableFrom(deploymentMethod.getReturnType()))
View Full Code Here


    */
   private TargetDescription generateTarget(Method deploymentMethod)
   {
      if (deploymentMethod.isAnnotationPresent(TargetsContainer.class))
      {
         return new TargetDescription(deploymentMethod.getAnnotation(TargetsContainer.class).value());
      }
      return TargetDescription.DEFAULT;
   }
View Full Code Here

     
      DeploymentDescription deploymentOne = scenario.get(0);

      Assert.assertEquals(
            "Verify deployment has specified target",
            new TargetDescription("target-first"),
            deploymentOne.getTarget());

      Assert.assertEquals(
            "Verify deployment has specified protocol",
            new ProtocolDescription("protocol-first"),
            deploymentOne.getProtocol());
     
      Assert.assertEquals(1, deploymentOne.getOrder());
      Assert.assertEquals(false, deploymentOne.managed());
      Assert.assertEquals(false, deploymentOne.testable());
      Assert.assertTrue(JavaArchive.class.isInstance(deploymentOne.getArchive()));
      Assert.assertNull(deploymentOne.getExpectedException());
     
      DeploymentDescription deploymentTwo = scenario.get(1);

      Assert.assertEquals(
            "Verify deployment has specified target",
            new TargetDescription("target-second"),
            deploymentTwo.getTarget());
      Assert.assertEquals(
            "Verify deployment has specified protocol",
            new ProtocolDescription("protocol-second"),
            deploymentTwo.getProtocol());
View Full Code Here

    * @param deploymentMethod
    * @return
    */
   private DeploymentDescription generateDeployment(Method deploymentMethod)
   {
      TargetDescription target = generateTarget(deploymentMethod);
      ProtocolDescription protocol = generateProtocol(deploymentMethod);
     
      Deployment deploymentAnnotation = deploymentMethod.getAnnotation(Deployment.class);
      DeploymentDescription deployment = null;
      if(Archive.class.isAssignableFrom(deploymentMethod.getReturnType()))
View Full Code Here

    */
   private TargetDescription generateTarget(Method deploymentMethod)
   {
      if(deploymentMethod.isAnnotationPresent(TargetsContainer.class))
      {
         return new TargetDescription(deploymentMethod.getAnnotation(TargetsContainer.class).value());
      }
      return TargetDescription.DEFAULT;
   }
View Full Code Here

      for(DeploymentDescription deploymentDesc : scenario) {

         if(deploymentDesc.getOrder() == 1) {
            Assert.assertEquals(
                  "Verify deployment has specified target",
                  new TargetDescription("target-first"),
                  deploymentDesc.getTarget());

            Assert.assertEquals(
                  "Verify deployment has specified protocol",
                  new ProtocolDescription("protocol-first"),
                  deploymentDesc.getProtocol());

            Assert.assertEquals(1, deploymentDesc.getOrder());
            Assert.assertEquals(false, deploymentDesc.managed());
            Assert.assertEquals(false, deploymentDesc.testable());
            Assert.assertTrue(Validate.isArchiveOfType(JavaArchive.class, deploymentDesc.getArchive()));
            Assert.assertNull(deploymentDesc.getExpectedException());
         } else {
            Assert.assertEquals(
                  "Verify deployment has specified target",
                  new TargetDescription("target-second"),
                  deploymentDesc.getTarget());
            Assert.assertEquals(
                  "Verify deployment has specified protocol",
                  new ProtocolDescription("protocol-second"),
                  deploymentDesc.getProtocol());
View Full Code Here

   }

   private DeploymentDescription createDeploymentDescription(String targetName)
   {
      return new DeploymentDescription(DEPLOYMENT_NAME, ShrinkWrap.create(JavaArchive.class))
               .setTarget(new TargetDescription(targetName));
   }
View Full Code Here

      Mockito.when(containerStopped.getState()).thenReturn(State.STOPPED);
      Mockito.when(containerStopped.getName()).thenReturn("_CONTAINER_STOPPED_");
     
      Mockito.when(reg.getContainer("_DEFAULT_")).thenReturn(container);
      Mockito.when(reg.getContainer("_CONTAINER_STOPPED_")).thenReturn(containerStopped);
      Mockito.when(reg.getContainer(new TargetDescription("_DEFAULT_"))).thenReturn(container);
      Mockito.when(reg.getContainer(new TargetDescription("_CONTAINER_STOPPED_"))).thenReturn(containerStopped);
     
      bind(ApplicationScoped.class, DeploymentScenario.class, new DeploymentScenario());
      bind(ApplicationScoped.class, ContainerRegistry.class, reg);

      fire(new SetupContainers()); // binds the Deployer
View Full Code Here

   @Test
   public void shouldFireDeploymentEventOnDeploy() throws Exception
   {
      DeploymentDescription description = new DeploymentDescription(DEPLOYMENT_NAME, ShrinkWrap.create(JavaArchive.class));
      description.shouldBeManaged(false);
      description.setTarget(new TargetDescription("_DEFAULT_"));
      scenario.get().addDeployment(description);
     
      deployer.get().deploy(DEPLOYMENT_NAME);
     
      assertEventFired(DeployDeployment.class, 1);
View Full Code Here

   @Test
   public void shouldFireUnDeploymentEventOnUnDeploy() throws Exception
   {
      DeploymentDescription description = new DeploymentDescription(DEPLOYMENT_NAME, ShrinkWrap.create(JavaArchive.class));
      description.shouldBeManaged(false);
      description.setTarget(new TargetDescription("_DEFAULT_"));
      scenario.get().addDeployment(description);
     
      deployer.get().undeploy(DEPLOYMENT_NAME);
     
      assertEventFired(UnDeployDeployment.class, 1);
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.client.deployment.TargetDescription

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.