Package com.cenqua.clover.types.junit

Examples of com.cenqua.clover.types.junit.CloverOptimisedTestSet


        final List includes = optimizeIncludes != null ? optimizeIncludes : (surefireIncludes != null) ? surefireIncludes : DEFAULT_INCLUDES;
        final List excludes = optimizeExcludes != null ? optimizeExcludes : surefireExcludes;


        final CloverOptimisedTestSet testsToRun = new CloverOptimisedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        antProj.setProperty(CloverNames.PROP_INITSTRING, getCloverDatabase());
        antProj.setName(getProject().getName());
       
       
        final List testSources = getProject().getTestCompileSourceRoots();
        for (Iterator iterator = testSources.iterator(); iterator.hasNext();) {
            String testRoot = (String) iterator.next();
            final File testRootDir = new File(testRoot);
            if (!testRootDir.exists()) {
                // if the test dir does not exist, do not add this as a fileset.
                continue;
            }
           
            FileSet testFileSet = new FileSet();
            testFileSet.setProject(antProj);

            testFileSet.setDir(testRootDir);


            testFileSet.appendIncludes((String[]) includes.toArray(new String[includes.size()]));
            getLog().info("INCLUDING: " + includes);

            if (excludes != null && excludes.size() > 0) {
                testFileSet.appendExcludes((String[]) excludes.toArray(new String[excludes.size()]));
                getLog().info("EXCLUDING: " + excludes);
            }

            testsToRun.add(testFileSet);
        }
        return testsToRun.getOptimisedTestResource();
    }
View Full Code Here

TOP

Related Classes of com.cenqua.clover.types.junit.CloverOptimisedTestSet

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.