Class JUnitEntryPoints
java.lang.Object
com.ibm.wala.core.util.scope.JUnitEntryPoints
This class represents entry points (
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.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetSetUpTearDownMethods
(IClass testClass) Get the "setUp" and "tearDown" methods in the given classstatic boolean
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.
-
Constructor Details
-
JUnitEntryPoints
public JUnitEntryPoints()
-
-
Method Details
-
make
Construct JUnit entrypoints for all the JUnit test methods in the given scope.- Throws:
IllegalArgumentException
- if cha is null
-
makeOne
public static Iterable<Entrypoint> makeOne(IClassHierarchy cha, String targetPackageName, String targetSimpleClassName, String targetMethodName) Construct JUnit entrypoints for the specified test method in a scope.- Throws:
IllegalArgumentException
- if cha is null- API Note:
- Only handles JUnit3.
-
isJUnitTestCase
Check if the given class is a JUnit test class. A JUnit test class is a subclass of junit.framework.TestCase or junit.framework.TestSuite.- Throws:
IllegalArgumentException
- if klass is null- API Note:
- Applicable only to JUnit3.
-
isJUnitMethod
Check if the given method is a JUnit test method, assuming that it is declared in a JUnit test class. A method is a JUnit test method if the name has the prefix "test", or its name is "setUp" or "tearDown".- Throws:
IllegalArgumentException
- if m is null- API Note:
- Only handles JUnit3.
-
getSetUpTearDownMethods
-