public class JUnitEntryPoints extends Object
Entrypoint
)s of JUnit test methods. JUnit test methods are those invoked by the JUnit
framework reflectively The entry points can be used to specify entry points of a call graph.
This implementation only handles JUnit 3.Constructor and Description |
---|
JUnitEntryPoints() |
Modifier and Type | Method and Description |
---|---|
static Set<IMethod> |
getSetUpTearDownMethods(IClass testClass)
Get the "setUp" and "tearDown" methods in the given class
|
static boolean |
isJUnitMethod(IMethod m)
Check if the given method is a JUnit test method, assuming that it is declared in a JUnit test class.
|
static boolean |
isJUnitTestCase(IClass klass)
Check if the given class is a JUnit test class.
|
static Iterable<Entrypoint> |
make(IClassHierarchy cha)
Construct JUnit entrypoints for all the JUnit test methods in the given scope.
|
static Iterable<Entrypoint> |
makeOne(IClassHierarchy cha,
String targetPackageName,
String targetSimpleClassName,
String targetMethodName)
Construct JUnit entrypoints for the specified test method in a scope.
|
public static Iterable<Entrypoint> make(IClassHierarchy cha)
IllegalArgumentException
- if cha is nullpublic static Iterable<Entrypoint> makeOne(IClassHierarchy cha, String targetPackageName, String targetSimpleClassName, String targetMethodName)
IllegalArgumentException
- if cha is nullpublic static boolean isJUnitTestCase(IClass klass)
IllegalArgumentException
- if klass is nullpublic static boolean isJUnitMethod(IMethod m)
IllegalArgumentException
- if m is nullpublic static Set<IMethod> getSetUpTearDownMethods(IClass testClass) throws ClassHierarchyException
ClassHierarchyException