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_ARRAYprivate java.lang.reflect.MethodsetUpMethodprivate java.lang.reflect.MethodtearDownMethodprivate static java.lang.StringTEST_METHOD_PREFIXprivate java.lang.Class<?>testClassprivate java.util.List<java.lang.reflect.Method>testMethodsprivate java.lang.ObjecttestObject
-
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 voiddiscoverTestMethods()voidexecute(RunListener reportManager, java.lang.ClassLoader loader)private booleanexecuteTestMethod(java.lang.reflect.Method method, java.lang.Object[] args, RunListener reportManager)private voidexecuteTestMethods(RunListener reportManager)java.lang.StringgetName()private java.lang.Class<?>getTestClass()private java.lang.StringgetTestName(java.lang.String testMethodName)private static booleanisValidTestMethod(java.lang.reflect.Method m)private voidsetUpFixture()private voidtearDownFixture()
-
-
-
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:
executein 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:
getNamein interfaceSurefireTestSet
-
getTestClass
private java.lang.Class<?> getTestClass()
-
-