Package org.junit.runner

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


        assertThat( computer.classes.size(), is( 0 ) );
        assertThat( computer.nestedClasses.size(), is( 2 ) );
        assertThat( computer.nestedSuites.size(), is( 0 ) );
        assertFalse( computer.splitPool );
        assertThat( computer.poolCapacity, is( 3 ) );
        assertTrue( result.wasSuccessful() );
        assertThat( Class1.maxConcurrentMethods, is( 1 ) );
        assertThat( timeSpent, between( 1950, 2250 ) );
    }

    @Test
View Full Code Here


        assertThat(computer.classes.size(), is(0));
        assertThat(computer.nestedClasses.size(), is(2));
        assertThat(computer.nestedSuites.size(), is(0));
        assertTrue(computer.splitPool);
        assertThat(computer.poolCapacity, is(ParallelComputerBuilder.TOTAL_POOL_SIZE_UNDEFINED));
        assertTrue(result.wasSuccessful());
        assertThat(Class1.maxConcurrentMethods, is(3));
        assertThat(timeSpent, between(950, 1250));
    }

    @Test
View Full Code Here

        assertThat(computer.classes.size(), is(1));
        assertThat(computer.nestedClasses.size(), is(2));
        assertThat(computer.nestedSuites.size(), is(0));
        assertTrue(computer.splitPool);
        assertThat(computer.poolCapacity, is(ParallelComputerBuilder.TOTAL_POOL_SIZE_UNDEFINED));
        assertTrue(result.wasSuccessful());
        assertThat(Class1.maxConcurrentMethods, is(3));
        assertThat(timeSpent, between(950, 1250));
    }

    @Test
View Full Code Here

        assertThat(computer.classes.size(), is(1));
        assertThat(computer.nestedClasses.size(), is(2));
        assertThat(computer.nestedSuites.size(), is(0));
        assertTrue(computer.splitPool);
        assertThat(computer.poolCapacity, is(ParallelComputerBuilder.TOTAL_POOL_SIZE_UNDEFINED));
        assertTrue(result.wasSuccessful());
        assertThat(Class1.maxConcurrentMethods, is(2));
        assertThat(timeSpent, between(1450, 1750));
    }

    private static class ShutdownTest {
View Full Code Here

    @Test(timeout = 2000)
    public void shutdown() {
        Result result = new ShutdownTest().run(false);
        long timeSpent = runtime.stop();
        assertTrue(result.wasSuccessful());
        assertTrue(beforeShutdown);
        assertThat(timeSpent, between(450, 1250));
    }

    @Test(timeout = 2000)
View Full Code Here

    public void nothingParallel() {
        JUnitCore core = new JUnitCore();
        ParallelComputerBuilder builder = new ParallelComputerBuilder();

        Result result = core.run(builder.buildComputer(), NothingDoingTest1.class, NothingDoingTest2.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(1).buildComputer(), NothingDoingTest1.class, NothingDoingTest2.class);
View Full Code Here

        Result result = core.run(builder.buildComputer(), NothingDoingTest1.class, NothingDoingTest2.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(1).buildComputer(), NothingDoingTest1.class, NothingDoingTest2.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(1).buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
View Full Code Here

        result = core.run(builder.buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(1).buildComputer(), NothingDoingTest1.class, NothingDoingTest2.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(1).buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(2).buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
View Full Code Here

        result = core.run(builder.useOnePool(1).buildComputer(), NothingDoingTest1.class, NothingDoingTest2.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(1).buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(2).buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
        assertTrue(result.wasSuccessful());

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

        result = core.run(builder.useOnePool(1).buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
        assertTrue(result.wasSuccessful());

        result = core.run(builder.useOnePool(2).buildComputer(), NothingDoingTest1.class, NothingDoingSuite.class);
        assertTrue(result.wasSuccessful());

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

        result = core.run(builder.useOnePool(2).parallelSuites(1).parallelClasses(1).buildComputer(), classes);
        assertTrue(result.wasSuccessful());
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.