Package org.junit.runner

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


        ParallelComputer pc = pcBuilder.buildComputer();
        Result result = new JUnitCore().run( pc, TestClass.class );
        long timeSpent = runtime.stop();
        long deltaTime = 500L;

        assertTrue( result.wasSuccessful() );
        assertThat( result.getRunCount(), is( 3 ) );
        assertThat( result.getFailureCount(), is( 0 ) );
        assertThat( result.getIgnoreCount(), is( 0 ) );
        assertEquals( 10000L, timeSpent, deltaTime );
    }
View Full Code Here


        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()";
View Full Code Here

        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( 4 ) );
        assertTrue( result.wasSuccessful() );
        if ( Class1.maxConcurrentMethods == 1 )
        {
            assertThat( timeSpent, between( 1950, 2250 ) );
        }
        else if ( Class1.maxConcurrentMethods == 2 )
View Full Code Here

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

    @Test
View Full Code Here

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

    @Test
View Full Code Here

        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 ) );
    }

    @Test( timeout = 2000 )
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

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.