Package junit.runner

Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String classNameFromFile​(java.lang.String classFileName)  
      java.util.Hashtable collectFilesInPath​(java.lang.String classPath)  
      java.util.Enumeration collectTests()
      Returns an enumeration of Strings with qualified class names
      protected boolean isTestClass​(java.lang.String classFileName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • collectFilesInPath

        public java.util.Hashtable collectFilesInPath​(java.lang.String classPath)
      • isTestClass

        protected boolean isTestClass​(java.lang.String classFileName)
      • classNameFromFile

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