Package org.apache.maven.surefire.junit
Class PojoTestSet
- java.lang.Object
-
- org.apache.maven.surefire.junit.PojoTestSet
-
- All Implemented Interfaces:
SurefireTestSet
public class PojoTestSet extends java.lang.Object implements SurefireTestSet
Executes a JUnit3 test class
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Object[]
EMPTY_OBJECT_ARRAY
private java.lang.reflect.Method
setUpMethod
private java.lang.reflect.Method
tearDownMethod
private static java.lang.String
TEST_METHOD_PREFIX
private java.lang.Class<?>
testClass
private java.util.List<java.lang.reflect.Method>
testMethods
private java.lang.Object
testObject
-
Constructor Summary
Constructors Constructor Description PojoTestSet(java.lang.Class<?> testClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
discoverTestMethods()
void
execute(RunListener reportManager, java.lang.ClassLoader loader)
private boolean
executeTestMethod(java.lang.reflect.Method method, java.lang.Object[] args, RunListener reportManager)
private void
executeTestMethods(RunListener reportManager)
java.lang.String
getName()
private java.lang.Class<?>
getTestClass()
private java.lang.String
getTestName(java.lang.String testMethodName)
private static boolean
isValidTestMethod(java.lang.reflect.Method m)
private void
setUpFixture()
private void
tearDownFixture()
-
-
-
Field Detail
-
TEST_METHOD_PREFIX
private static final java.lang.String TEST_METHOD_PREFIX
- See Also:
- Constant Field Values
-
EMPTY_OBJECT_ARRAY
private static final java.lang.Object[] EMPTY_OBJECT_ARRAY
-
testObject
private final java.lang.Object testObject
-
testClass
private final java.lang.Class<?> testClass
-
testMethods
private java.util.List<java.lang.reflect.Method> testMethods
-
setUpMethod
private java.lang.reflect.Method setUpMethod
-
tearDownMethod
private java.lang.reflect.Method tearDownMethod
-
-
Constructor Detail
-
PojoTestSet
public PojoTestSet(java.lang.Class<?> testClass) throws TestSetFailedException
- Throws:
TestSetFailedException
-
-
Method Detail
-
execute
public void execute(RunListener reportManager, java.lang.ClassLoader loader)
- Specified by:
execute
in interfaceSurefireTestSet
-
executeTestMethods
private void executeTestMethods(RunListener reportManager)
-
executeTestMethod
private boolean executeTestMethod(java.lang.reflect.Method method, java.lang.Object[] args, RunListener reportManager)
-
getTestName
private java.lang.String getTestName(java.lang.String testMethodName)
-
setUpFixture
private void setUpFixture() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
tearDownFixture
private void tearDownFixture() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
discoverTestMethods
private void discoverTestMethods()
-
isValidTestMethod
private static boolean isValidTestMethod(java.lang.reflect.Method m)
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceSurefireTestSet
-
getTestClass
private java.lang.Class<?> getTestClass()
-
-