org.apache.tools.ant.taskdefs.optional.junit
public class JUnitVersionHelper extends Object
Since: Ant 1.7
| Field Summary | |
|---|---|
| static String | JUNIT_FRAMEWORK_JUNIT4_TEST_CASE_FACADE
Name of the JUnit4 class we look for.
|
| Method Summary | |
|---|---|
| static String | getTestCaseClassName(Test test)
Tries to find the name of the class which a test represents
across JUnit 3 and 4. |
| static String | getTestCaseName(Test t)
JUnit 3.7 introduces TestCase.getName() and subsequent versions
of JUnit remove the old name() method. |
Since: Ant 1.7.1
Parameters: test test case to look at
Returns: the extracted class name.
Since: Ant 1.7.1 (it was private until then)
since Ant 1.5.1 this method will invoke "public
String getName()" on any implementation of Test if
it exists.
Since Ant 1.7 also checks for JUnit4TestCaseFacade explicitly. This is used by junit.framework.JUnit4TestAdapter.
Parameters: t the test.
Returns: the name of the test.