Examples of TestRunnerAdaptor


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

    * 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

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

{
   @Test
   public void shouldKeepInitializationExceptionBetweenTestCases() throws Exception
   {
      String exceptionMessage = "TEST_EXCEPTION_BEFORE_SUITE_FAILING";
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      doThrow(new Exception(exceptionMessage)).when(adaptor).beforeSuite();

      Result result = run(adaptor, ArquillianClass1.class, ArquillianClass1.class);
     
      Assert.assertFalse(result.wasSuccessful());
View Full Code Here

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

public class InSequenceSorterTestCase extends JUnitTestBaseClass
{
   @Test
   public void shouldInvokeInOrder() throws Exception
   {
      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      executeAllLifeCycles(adaptor);

      final List<String> runOrder = new ArrayList<String>();
      Result result = run(adaptor,
            new RunListener() {
View Full Code Here

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

   }

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

      final List<String> runOrder = new ArrayList<String>();
      Result result = run(adaptor,
            new RunListener() {
View Full Code Here

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

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

      Assert.assertTrue(result.wasSuccessful());
      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);
     
      Result result = run(adaptor, ArquillianClass1.class);
     
      Assert.assertTrue(result.wasSuccessful());
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());
     
      Result 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());
     
      Result result = run(adaptor, ArquillianClass1.class);
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);
     
      Result result = run(adaptor, ArquillianClass1.class, ArquillianClass1.class, ArquillianClass1.class, ArquillianClass1.class);
      Assert.assertTrue(result.wasSuccessful());
View Full Code Here

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

    * 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
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.