Package org.jboss.arquillian.test.spi

Examples of org.jboss.arquillian.test.spi.TestClass


   @Test
   public void shouldLogWarningForMismatchingArchiveTypeAndFileExtension() throws Exception
   {
      new AnnotationDeploymentScenarioGenerator().generate(
            new TestClass(DeploymentWithMismatchingTypeAndFileExtension.class));

      String capturedLog = getTestCapturedLog();
      Assert.assertTrue(capturedLog.contains(expectedLogPartForArchiveWithUnexpectedFileExtension));
   }
View Full Code Here


   @Test
   public void shouldNotLogWarningForMatchingArchiveTypeAndFileExtension() throws Exception
   {
      new AnnotationDeploymentScenarioGenerator().generate(
            new TestClass(DeploymentWithSpecifiedFileExtension.class));

      String capturedLog = getTestCapturedLog();
      Assert.assertFalse(capturedLog.contains(expectedLogPartForArchiveWithUnexpectedFileExtension));
   }
View Full Code Here

   @Test
   public void shouldLogWarningForDeploymentWithMissingFileExtension() throws Exception
   {
      new AnnotationDeploymentScenarioGenerator().generate(
            new TestClass(DeploymentWithMissingFileExtension.class));

      String capturedLog = getTestCapturedLog();
      Assert.assertTrue(capturedLog.contains(expectedLogPartForArchiveWithUnexpectedFileExtension));
   }
View Full Code Here

   @Test // should not log warning when using the default archive name
   public void shouldNotLogWarningForDeploymentWithoutSpecifiedName() throws Exception
   {
      new AnnotationDeploymentScenarioGenerator().generate(
            new TestClass(DeploymentWithoutSpecifiedName.class));

      String capturedLog = getTestCapturedLog();
      Assert.assertFalse(capturedLog.contains(expectedLogPartForArchiveWithUnexpectedFileExtension));
   }
View Full Code Here

      }
   }

   private List<DeploymentDescription> generate(Class<?> testClass)
   {
      return new AnnotationDeploymentScenarioGenerator().generate(new TestClass(testClass));
   }
View Full Code Here

            }
        }
    }

    private BeanContext beanContext() {
        final TestClass tc = testClass.get();
        if (tc == null) {
            return null;
        }

        final String className = tc.getName();
        final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
        for (final AppContext app : containerSystem.getAppContexts()) {
            final BeanContext context = containerSystem.getBeanContext(app.getId() + "_" + className);
            if (context != null) {
                return context;
View Full Code Here

        public void startup(@Observes(precedence = -100) ManagerStarted event, ArquillianDescriptor descriptor) {
            deploymentClass = getDeploymentClass(descriptor);

            executeInClassScope(new Callable<Void>() {
                public Void call() throws Exception {
                    generateDeploymentEvent.fire(new GenerateDeployment(new TestClass(deploymentClass)));
                    suiteDeploymentScenario = classDeploymentScenario.get();
                    return null;
                }
            });
        }
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

   @Test
   public void shouldLogWarningForMismatchingArchiveTypeAndFileExtension() throws Exception
   {
      new AnnotationDeploymentScenarioGenerator().generate(
            new TestClass(DeploymentWithMismatchingTypeAndFileExtension.class));

      String capturedLog = getTestCapturedLog();
      Assert.assertTrue(capturedLog.contains(expectedLogPartForArchiveWithUnexpectedFileExtension));
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.test.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.