Package org.apache.maven.surefire.util

Examples of org.apache.maven.surefire.util.TestsToRun


        final Map<String, TestSet> testSetMap = new ConcurrentHashMap<String, TestSet>();

        RunListener listener =
            ConcurrentRunListener.createInstance( testSetMap, reporterFactory, false, false, consoleLogger );

        TestsToRun testsToRun = new TestsToRun( Arrays.<Class>asList( TestClassTest.class ) );

        org.junit.runner.notification.RunListener jUnit4RunListener = new JUnitCoreRunListener( listener, testSetMap );

        List<org.junit.runner.notification.RunListener> customRunListeners =
            new ArrayList<org.junit.runner.notification.RunListener>();
View Full Code Here


        {
            throw new IllegalStateException( "You can't call locateTestSets twice" );
        }
        testSets = new TreeMap<String, TestNGTestSet>();

        final TestsToRun scanned = scanResult.applyFilter( new NonAbstractClassFilter(), classLoader );

        final TestsToRun testsToRun = runOrderCalculator.orderTestClasses( scanned );

        for ( Class testClass : testsToRun )
        {
            TestNGTestSet testSet = new TestNGTestSet( testClass );
View Full Code Here

        reporter.testSetCompleted( report );
    }

    private TestsToRun scanClassPath()
    {
        final TestsToRun testsToRun = scanResult.applyFilter( testChecker, testClassLoader );
        return runOrderCalculator.orderTestClasses( testsToRun );
    }
View Full Code Here

        }
    }

    private TestsToRun scanClassPath()
    {
        final TestsToRun scanned = scanResult.applyFilter( null, testClassLoader );
        return runOrderCalculator.orderTestClasses( scanned );
    }
View Full Code Here

                        : groupFilter;
    }

    private TestsToRun scanClassPath()
    {
        final TestsToRun scanned = scanResult.applyFilter( scannerFilter, testClassLoader );
        return runOrderCalculator.orderTestClasses( scanned );
    }
View Full Code Here

        return testsToRun.iterator();
    }

    private TestsToRun scanClassPath()
    {
        final TestsToRun scannedClasses = scanResult.applyFilter( jUnit4TestChecker, testClassLoader );
        return runOrderCalculator.orderTestClasses( scannedClasses );
    }
View Full Code Here

                        : groupFilter;
    }

    private TestsToRun scanClassPath()
    {
        final TestsToRun scanned = scanResult.applyFilter( scannerFilter, testClassLoader );
        return runOrderCalculator.orderTestClasses( scanned );
    }
View Full Code Here

        }
    }

    private TestsToRun scanClassPath()
    {
        final TestsToRun scanned = scanResult.applyFilter( null, testClassLoader );
        return runOrderCalculator.orderTestClasses( scanned );
    }
View Full Code Here

        final Map<String, TestSet> testSetMap = new ConcurrentHashMap<String, TestSet>();

        RunListener listener =
            ConcurrentRunListener.createInstance( testSetMap, reporterFactory, false, false, consoleLogger );

        TestsToRun testsToRun = new TestsToRun( Arrays.<Class>asList( TestClassTest.class ) );

        org.junit.runner.notification.RunListener jUnit4RunListener = new JUnitCoreRunListener( listener, testSetMap );

        List<org.junit.runner.notification.RunListener> customRunListeners =
            new ArrayList<org.junit.runner.notification.RunListener>();
View Full Code Here

    @SuppressWarnings( "unchecked" )
    private TestsToRun getSuitesAsList( Filter filter )
    {
        List<Class<?>> res = new ArrayList<Class<?>>( 500 );
        TestsToRun max = scanClassPath();
        if ( filter == null )
        {
            return max;
        }

        Iterator<Class<?>> it = max.iterator();
        while ( it.hasNext() )
        {
            Class<?> clazz = it.next();
            boolean isCategoryAnnotatedClass = jUnit48Reflector.isCategoryAnnotationPresent( clazz );
            Description d = Description.createSuiteDescription( clazz );
            if ( filter.shouldRun( d ) )
            {
                res.add( clazz );
            }
            else
            {
                for ( Method method : clazz.getMethods() )
                {
                    final Description testDescription =
                        Description.createTestDescription( clazz, method.getName(), method.getAnnotations() );
                    if ( filter.shouldRun( testDescription ) )
                    {
                        res.add( clazz );
                        break;
                    }
                }
            }
        }
        return new TestsToRun( res );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.surefire.util.TestsToRun

Copyright © 2018 www.massapicom. 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.