junit.framework.Test
public class JUnit4TestMethodAdapter
extends java.lang.Object
implements junit.framework.Test
run(TestResult)
executes
the given JUnit-4-style test methods and notifies the given TestResult
object using its old (JUnit 3.8.x style) API.Constructor | Description |
---|---|
JUnit4TestMethodAdapter(java.lang.Class<?> testClass,
java.lang.String[] methodNames) |
Creates a new adapter for the given class and a method within the class.
|
Modifier and Type | Method | Description |
---|---|---|
int |
countTestCases() |
|
org.junit.runner.Description |
getDescription() |
|
java.lang.Class<?> |
getTestClass() |
|
java.util.List<junit.framework.Test> |
getTests() |
|
void |
run(junit.framework.TestResult result) |
|
java.lang.String |
toString() |
public JUnit4TestMethodAdapter(java.lang.Class<?> testClass, java.lang.String[] methodNames)
testClass
- test class containing the method to be executedmethodNames
- names of the test methods that are to be executedjava.lang.IllegalArgumentException
- if any of the arguments is null
or if any of the given method names is null
or emptypublic int countTestCases()
countTestCases
in interface junit.framework.Test
public org.junit.runner.Description getDescription()
public java.util.List<junit.framework.Test> getTests()
public java.lang.Class<?> getTestClass()
public void run(junit.framework.TestResult result)
run
in interface junit.framework.Test
public java.lang.String toString()
toString
in class java.lang.Object