Package org.jboss.arquillian.spi

Examples of org.jboss.arquillian.spi.TestClass


      if(deployment == null)
      {
         return;
      }
     
      TestClass testClass = event.getTestClass();
      String deploymentContent = deployment.toString(new ToolingDeploymentFormatter(testClass.getJavaClass()));
      writeOutToFile(
            new File(deploymentOutputFolder + "/" + testClass.getName() + ".xml"),
            deploymentContent);
   }
View Full Code Here


   private void injectOSGiContainer(Context context, Object testCase, Field field)
   {
      try
      {
         TestClass testClass = new TestClass(testCase.getClass());
         field.set(testCase, getOSGiContainer(context, testClass));
      }
      catch (IllegalAccessException ex)
      {
         throw new IllegalStateException("Cannot inject BundleContext", ex);
View Full Code Here

   private void injectDeploymentProvider(Context context, Object testCase, Field field)
   {
      try
      {
         TestClass testClass = new TestClass(testCase.getClass());
         field.set(testCase, getDeploymentProvider(context, testClass));
      }
      catch (IllegalAccessException ex)
      {
         throw new IllegalStateException("Cannot inject DeploymentProvider", ex);
View Full Code Here

    * @param testClass The Test case {@link Class}
    * @throws IllegalArgumentException if testCase is null
    */
   public ClassEvent(Class<?> testClass)
   {
      this(new TestClass(testClass));
   }
View Full Code Here

{

   @Test
   public void shouldHandleMultipleDeploymentsAllDefault() throws Exception
   {
      DeploymentScenario scenario = new AnnotationDeploymentScenarioGenerator().generate(new TestClass(MultiDeploymentsDefault.class));
     
      Assert.assertNotNull(scenario);
      Assert.assertEquals(
            "Verify all deployments were found",
            2, scenario.getDeployments().size());
View Full Code Here

   }
  
   @Test
   public void shouldHandleMultipleDeploymentsAllSet() throws Exception
   {
      DeploymentScenario scenario = new AnnotationDeploymentScenarioGenerator().generate(new TestClass(MultiDeploymentsSet.class));
     
      Assert.assertNotNull(scenario);
      Assert.assertEquals(
            "Verify all deployments were found",
            2, scenario.getDeployments().size());
View Full Code Here

   }
  
   @Test
   public void shouldReadExpectedAndOverrideDeployment()
   {
      DeploymentScenario scenario = new AnnotationDeploymentScenarioGenerator().generate(new TestClass(ExpectedDeploymentExceptionSet.class));
     
      Assert.assertNotNull(scenario);
      Assert.assertEquals(
            "Verify all deployments were found",
            1, scenario.getDeployments().size());
View Full Code Here

   @Test(expected = IllegalArgumentException.class)
   public void shouldThrowExceptionOnDeploymentNotPresent() throws Exception
   {
      new AnnotationDeploymentScenarioGenerator().generate(
            new TestClass(DeploymentNotPresent.class));
   }
View Full Code Here

   @Test(expected = IllegalArgumentException.class)
   public void shouldThrowExceptionOnDeploymentNotStatic() throws Exception
   {
      new AnnotationDeploymentScenarioGenerator().generate(
            new TestClass(DeploymentNotStatic.class));
   }
View Full Code Here

   @Test(expected = IllegalArgumentException.class)
   public void shouldThrowExceptionOnDeploymentWrongReturnType() throws Exception
   {
      new AnnotationDeploymentScenarioGenerator().generate(
            new TestClass(DeploymentWrongReturnType.class));
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spi.TestClass

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.