1 package junit.runner;
2 
3 /**
4  * An implementation of a TestCollector that considers
5  * a class to be a test class when it contains the
6  * pattern "Test" in its name
7  * @see TestCollector
8  * {@hide} - Not needed for 1.0 SDK
9  */
10 public class SimpleTestCollector extends ClassPathTestCollector {
11 
SimpleTestCollector()12     public SimpleTestCollector() {
13     }
14 
isTestClass(String classFileName)15     protected boolean isTestClass(String classFileName) {
16         return
17                 classFileName.endsWith(".class") &&
18                 classFileName.indexOf('$') < 0 &&
19                 classFileName.indexOf("Test") > 0;
20     }
21 }
22