Examples of testable()


Examples of org.arquillian.tutorial.extension.deployment.api.DeployProjectArtifact.testable()

                throw new IllegalStateException("Project artifact has not been generated: " + archiveFile.getAbsolutePath());
            }
            Archive<?> archive = ShrinkWrap.create(type, archiveName).as(ZipImporter.class)
                    .importFrom(new File("target/" + archiveName)).as(type);
            DeploymentDescription dd = new DeploymentDescription("application", archive);
            dd.shouldBeTestable(config.testable());
            return Arrays.asList(dd);
        }
        return Collections.emptyList();
    }
   
View Full Code Here

Examples of org.jboss.arquillian.api.Deployment.testable()

      Deployment deploymentAnnotation = deploymentMethod.getAnnotation(Deployment.class);
      DeploymentDescription deployment = null;
      if(Archive.class.isAssignableFrom(deploymentMethod.getReturnType()))
      {
         deployment = new DeploymentDescription(deploymentAnnotation.name(), invoke(Archive.class, deploymentMethod));
         deployment.shouldBeTestable(deploymentAnnotation.testable());
      }
      else if(Descriptor.class.isAssignableFrom(deploymentMethod.getReturnType()))
      {
         deployment = new DeploymentDescription(deploymentAnnotation.name(), invoke(Descriptor.class, deploymentMethod));
         //deployment.shouldBeTestable(false);
View Full Code Here

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription.testable()

     */
    public void verifyWarpDeployment(@Observes DeploymentScenario deploymentScenario) {
        if (testClass.get().getJavaClass().getAnnotation(WarpTest.class) != null) {
            for (Deployment deployment : deploymentScenario.deployments()) {
                DeploymentDescription description = deployment.getDescription();
                if (!description.testable()) {
                    throw new IllegalArgumentException("Warp deployments must be testable: " + testClass.get().getJavaClass()
                            + " - check that you have @Deployment(testable=true)");
                }
            }
        }
View Full Code Here

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription.testable()

   private void buildTestableDeployments(DeploymentScenario scenario, TestClass testCase, ProtocolRegistry protoReg)
   {
      for(Deployment deployment : scenario.deployments())
      {
         DeploymentDescription description = deployment.getDescription();
         if(!description.testable() || !description.isArchiveDeployment())
         {
            continue;
         }
         // TODO: could be optimalized to only be loaded pr Container
         List<Archive<?>> auxiliaryArchives = loadAuxiliaryArchives(description);
View Full Code Here

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription.testable()

   private void buildTestableDeployments(DeploymentScenario scenario, TestClass testCase, ProtocolRegistry protoReg)
   {
      for(Deployment deployment : scenario.deployments())
      {
         DeploymentDescription description = deployment.getDescription();
         if(!description.testable() || !description.isArchiveDeployment())
         {
            continue;
         }
         // TODO: could be optimalized to only be loaded pr Container
         List<Archive<?>> auxiliaryArchives = loadAuxiliaryArchives(description);
View Full Code Here

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription.testable()

      }

      DeploymentDescription description = deployment.getDescription();
      if(description.isArchiveDeployment())
      {
         Archive<?> archive = description.testable() ? description.getTestableArchive():description.getArchive();
         return archive.as(ZipExporter.class).exportAsInputStream();
      }
      else
      {
         return new ByteArrayInputStream(description.getDescriptor().exportAsString().getBytes());
View Full Code Here

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription.testable()

   private void buildTestableDeployments(DeploymentScenario scenario, TestClass testCase, ProtocolRegistry protoReg)
   {
      for(Deployment deployment : scenario.deployments())
      {
         DeploymentDescription description = deployment.getDescription();
         if(!description.testable() || !description.isArchiveDeployment())
         {
            continue;
         }
         // TODO: could be optimalized to only be loaded pr Container
         List<Archive<?>> auxiliaryArchives = loadAuxiliaryArchives(description);
View Full Code Here

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription.testable()

            new ProtocolDescription("protocol-first"),
            deploymentOne.getProtocol());

      Assert.assertEquals(1, deploymentOne.getOrder());
      Assert.assertEquals(false, deploymentOne.managed());
      Assert.assertEquals(false, deploymentOne.testable());
      Assert.assertTrue(Validate.isArchiveOfType(JavaArchive.class, deploymentOne.getArchive()));
      Assert.assertNull(deploymentOne.getExpectedException());

      DeploymentDescription deploymentTwo = scenario.get(1);
View Full Code Here

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription.testable()

            new ProtocolDescription("protocol-second"),
            deploymentTwo.getProtocol());

      Assert.assertEquals(2, deploymentTwo.getOrder());
      Assert.assertEquals(false, deploymentTwo.managed());
      Assert.assertEquals(true, deploymentTwo.testable());
      Assert.assertTrue(Validate.isArchiveOfType(JavaArchive.class, deploymentTwo.getArchive()));
      Assert.assertNull(deploymentTwo.getExpectedException());
   }

   @Test
View Full Code Here

Examples of org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription.testable()

            "Verify all deployments were found",
            1, scenario.size());

      DeploymentDescription deploymentOne = scenario.get(0);

      Assert.assertEquals(false, deploymentOne.testable());
      Assert.assertTrue(Validate.isArchiveOfType(JavaArchive.class, deploymentOne.getArchive()));
      Assert.assertEquals(Exception.class, deploymentOne.getExpectedException());
   }

   @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.