Examples of TestRunnerAdaptor


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

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

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

      executeAllLifeCycles(adaptor);

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

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

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

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

      executeAllLifeCycles(adaptor);

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

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

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

      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

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

public class TestNGIntegrationTestCase extends TestNGTestBaseClass
{
   @Test @Ignore("ARQ-582")
   public void shouldNotCallAnyMethodsWithoutLifecycleHandlers() throws Exception
   {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      when(adaptor.test(isA(TestMethodExecutor.class))).thenReturn(new TestResult(Status.PASSED));

      TestListenerAdapter result = run(adaptor, ArquillianClass1.class);

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

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

   }

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

      TestListenerAdapter result = run(adaptor, ArquillianClass1.class);

      Assert.assertTrue(wasSuccessful(result));
View Full Code Here

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

   }

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

      throwException(Cycle.BEFORE_CLASS, new Throwable());

      TestListenerAdapter result = run(adaptor, ArquillianClass1.class);
View Full Code Here

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

   }

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

      throwException(Cycle.BEFORE, new Throwable());

      TestListenerAdapter result = run(adaptor, ArquillianClass1.class);
View Full Code Here

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

   }

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

      // throwException removes exception marker when thrown
      throwException(Cycle.BEFORE_CLASS, new Throwable());
View Full Code Here

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

   }

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

      TestListenerAdapter result = run(adaptor, ArquillianClass1.class, ArquillianClass2.class);
      Assert.assertTrue(wasSuccessful(result));
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.