jmathlib.tools.junit.runner
Class ClassPathTestCollector

java.lang.Object
  extended by jmathlib.tools.junit.runner.ClassPathTestCollector
All Implemented Interfaces:
TestCollector
Direct Known Subclasses:
LoadingTestCollector, SimpleTestCollector

public abstract class ClassPathTestCollector
extends java.lang.Object
implements TestCollector

An implementation of a TestCollector that consults the class path. It considers all classes on the class path excluding classes in JARs. It leaves it up to subclasses to decide whether a class is a runnable Test.

See Also:
TestCollector

Field Summary
(package private) static int SUFFIX_LENGTH
           
 
Constructor Summary
ClassPathTestCollector()
           
 
Method Summary
protected  java.lang.String classNameFromFile(java.lang.String classFileName)
           
(package private)  void collectFilesInRoots(java.util.Vector roots, java.util.Hashtable result)
           
 java.util.Enumeration collectTests()
          Returns an enumeration of Strings with qualified class names
(package private)  void gatherFiles(java.io.File classRoot, java.lang.String classFileName, java.util.Hashtable result)
           
protected  boolean isTestClass(java.lang.String classFileName)
           
(package private)  java.util.Vector splitClassPath(java.lang.String classPath, java.lang.String separator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUFFIX_LENGTH

static final int SUFFIX_LENGTH
Constructor Detail

ClassPathTestCollector

public ClassPathTestCollector()
Method Detail

collectTests

public java.util.Enumeration collectTests()
Description copied from interface: TestCollector
Returns an enumeration of Strings with qualified class names

Specified by:
collectTests in interface TestCollector

collectFilesInRoots

void collectFilesInRoots(java.util.Vector roots,
                         java.util.Hashtable result)

gatherFiles

void gatherFiles(java.io.File classRoot,
                 java.lang.String classFileName,
                 java.util.Hashtable result)

splitClassPath

java.util.Vector splitClassPath(java.lang.String classPath,
                                java.lang.String separator)

isTestClass

protected boolean isTestClass(java.lang.String classFileName)

classNameFromFile

protected java.lang.String classNameFromFile(java.lang.String classFileName)

FOOTER

BOTTOM