Package org.jboss.arquillian.test.spi

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


      verify(adaptor, times(1)).afterSuite();
   }

   @Test
   public void shouldWorkWithExpectedException() throws Exception {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);

      executeAllLifeCycles(adaptor);

      Result result = run(adaptor, ArquillianClass1WithExpectedException.class);
View Full Code Here


      verify(adaptor, times(1)).afterSuite();
   }

   @Test
   public void shouldWorkWithAssume() throws Exception {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);

      executeAllLifeCycles(adaptor);
      final List<Failure> assumptionFailure = new ArrayList<Failure>();
      Result result = run(adaptor, new RunListener() {
          @Override
View Full Code Here

      verify(adaptor, times(1)).afterSuite();
   }

   @Test
   public void shouldThrowMultipleExceptionsWhenBeforeAndAfterThrowException() throws Exception {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);

      executeAllLifeCycles(adaptor);

      Result result = run(adaptor, ArquillianClass1ExceptionInBeforeAndAfter.class);
View Full Code Here

   @BeforeSuite(groups = "arquillian", inheritGroups = true)
   public void arquillianBeforeSuite() throws Exception
   {
      if(deployableTest.get() == null)
      {
         TestRunnerAdaptor adaptor = TestRunnerAdaptorBuilder.build();
         adaptor.beforeSuite();
         deployableTest.set(adaptor); // don't set TestRunnerAdaptor if beforeSuite fails
         cycleStack.get().push(Cycle.BEFORE_SUITE);
      }
   }
View Full Code Here

public class JUnitIntegrationTestCase extends JUnitTestBaseClass
{
   @Test
   public void shouldNotCallAnyMethodsWithoutLifecycleHandlers() throws Exception
   {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      when(adaptor.test(isA(TestMethodExecutor.class))).thenReturn(new TestResult(Status.PASSED));
     
      Result result = run(adaptor, ArquillianClass1.class);

      Assert.assertTrue(result.wasSuccessful());
      assertCycle(0, Cycle.values());
View Full Code Here

   }
  
   @Test
   public void shouldCallAllMethods() throws Exception
   {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      executeAllLifeCycles(adaptor);
     
      Result result = run(adaptor, ArquillianClass1.class);
     
      Assert.assertTrue(result.wasSuccessful());
View Full Code Here

   }
  
   @Test
   public void shouldCallAfterClassWhenBeforeThrowsException() throws Exception
   {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      executeAllLifeCycles(adaptor);
     
      throwException(Cycle.BEFORE_CLASS, new Throwable());
     
      Result result = run(adaptor, ArquillianClass1.class);
View Full Code Here

   }

   @Test
   public void shouldCallAfterWhenBeforeThrowsException() throws Exception
   {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      executeAllLifeCycles(adaptor);
     
      throwException(Cycle.BEFORE, new Throwable());
     
      Result result = run(adaptor, ArquillianClass1.class);
View Full Code Here

   }
  
   @Test
   public void shouldOnlyCallBeforeAfterSuiteOnce() throws Exception
   {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      executeAllLifeCycles(adaptor);
     
      Result result = run(adaptor, ArquillianClass1.class, ArquillianClass1.class, ArquillianClass1.class, ArquillianClass1.class);
      Assert.assertTrue(result.wasSuccessful());
View Full Code Here

    * ARQ-391, After not called when Error's are thrown, e.g. AssertionError
    */
   @Test
   public void shouldCallAllWhenTestThrowsException() throws Exception
   {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      executeAllLifeCycles(adaptor);
     
      throwException(Cycle.TEST, new Throwable());
     
      Result result = run(adaptor, ArquillianClass1.class);
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.test.spi.TestRunnerAdaptor

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.