Methods Summary |
---|
java.lang.Class | classFromFile(java.lang.String classFileName)
String className= classNameFromFile(classFileName);
if (!fLoader.isExcluded(className))
return fLoader.loadClass(className, false);
return null;
|
boolean | hasPublicConstructor(java.lang.Class testClass)
try {
TestSuite.getTestConstructor(testClass);
} catch(NoSuchMethodException e) {
return false;
}
return true;
|
boolean | hasSuiteMethod(java.lang.Class testClass)
try {
testClass.getMethod(BaseTestRunner.SUITE_METHODNAME, new Class[0]);
} catch(Exception e) {
return false;
}
return true;
|
protected boolean | isTestClass(java.lang.String classFileName)
try {
if (classFileName.endsWith(".class")) {
Class testClass= classFromFile(classFileName);
return (testClass != null) && isTestClass(testClass);
}
}
catch (ClassNotFoundException expected) {
}
catch (NoClassDefFoundError notFatal) {
}
return false;
|
boolean | isTestClass(java.lang.Class testClass)
if (hasSuiteMethod(testClass))
return true;
if (Test.class.isAssignableFrom(testClass) &&
Modifier.isPublic(testClass.getModifiers()) &&
hasPublicConstructor(testClass))
return true;
return false;
|