Package org.junit.runner

Examples of org.junit.runner.Result.wasSuccessful()


        assertTrue(result.wasSuccessful());

        Class<?>[] classes = {NothingDoingTest1.class, NothingDoingSuite.class};

        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses(1).buildComputer(), classes);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses().buildComputer(), classes);
        assertTrue(result.wasSuccessful());

        classes = new Class<?>[]{NothingDoingSuite.class, NothingDoingSuite.class,
View Full Code Here


        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses(1).buildComputer(), classes);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses().buildComputer(), classes);
        assertTrue(result.wasSuccessful());

        classes = new Class<?>[]{NothingDoingSuite.class, NothingDoingSuite.class,
                NothingDoingTest1.class, NothingDoingTest2.class, NothingDoingTest3.class};

        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses(1).buildComputer(), classes);
View Full Code Here

        classes = new Class<?>[]{NothingDoingSuite.class, NothingDoingSuite.class,
                NothingDoingTest1.class, NothingDoingTest2.class, NothingDoingTest3.class};

        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses(1).buildComputer(), classes);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses().buildComputer(), classes);
        assertTrue(result.wasSuccessful());
    }
View Full Code Here

        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses(1).buildComputer(), classes);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses().buildComputer(), classes);
        assertTrue(result.wasSuccessful());
    }

    private static void testKeepBeforeAfter(ParallelComputerBuilder builder, Class<?>... classes) {
        JUnitCore core = new JUnitCore();
        for (int round = 0; round < 5; round++) {
View Full Code Here

    private static void testKeepBeforeAfter(ParallelComputerBuilder builder, Class<?>... classes) {
        JUnitCore core = new JUnitCore();
        for (int round = 0; round < 5; round++) {
            NothingDoingTest1.methods.clear();
            Result result = core.run(builder.buildComputer(), classes);
            assertTrue(result.wasSuccessful());
            Iterator<String> methods = NothingDoingTest1.methods.iterator();
            for (Class<?> clazz : classes) {
                String a = clazz.getName() + "#a()";
                String b = clazz.getName() + "#b()";
                assertThat(methods.next(), is("init"));
View Full Code Here

        builder.useOnePool(8).parallelClasses(2).parallelMethods(2);
        JUnitCore core = new JUnitCore();
        NothingDoingTest1.methods.clear();
        Class<?>[] classes = {NothingDoingTest1.class, NothingDoingTest2.class, NothingDoingTest3.class};
        Result result = core.run(builder.buildComputer(), classes);
        assertTrue(result.wasSuccessful());
        ArrayList<String> methods = new ArrayList<String>(NothingDoingTest1.methods);
        assertThat(methods.size(), is(12));
        assertThat(methods.subList(9, 12), is(not(Arrays.asList("deinit", "deinit", "deinit"))));
    }
View Full Code Here

      System.setProperty("arquillian.debug", "true");
      TestRunnerAdaptor adaptor = spy(TestRunnerAdaptorBuilder.build());

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

      Assert.assertTrue(result.wasSuccessful());
      assertCycle(1, Cycle.values());

      verify(adaptor, times(1)).beforeSuite();
      verify(adaptor, times(1)).afterSuite();
   }
View Full Code Here

      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());
     
      verify(adaptor, times(1)).beforeSuite();
      verify(adaptor, times(1)).afterSuite();
   }
View Full Code Here

      TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
      executeAllLifeCycles(adaptor);
     
      Result result = run(adaptor, ArquillianClass1.class);
     
      Assert.assertTrue(result.wasSuccessful());
      assertCycle(1, Cycle.values());

      verify(adaptor, times(1)).beforeSuite();
      verify(adaptor, times(1)).afterSuite();
   }
View Full Code Here

      executeAllLifeCycles(adaptor);
     
      throwException(Cycle.BEFORE_CLASS, new Throwable());
     
      Result result = run(adaptor, ArquillianClass1.class);
      Assert.assertFalse(result.wasSuccessful());
     
      assertCycle(1, Cycle.BEFORE_CLASS, Cycle.AFTER_CLASS);
      assertCycle(0, Cycle.BEFORE, Cycle.AFTER, Cycle.TEST);
  
      verify(adaptor, times(1)).beforeSuite();
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.