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 static java.lang.String
SETUP_METHOD_NAME
private java.lang.reflect.Method
setUpMethod
private static java.lang.String
TEARDOWN_METHOD_NAME
private java.lang.reflect.Method
tearDownMethod
private static java.lang.String
TEST_METHOD_PREFIX
private java.lang.Class<?>
testClass
private java.util.Collection<java.lang.reflect.Method>
testMethods
-
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, 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
isNoArgsInstanceMethod(java.lang.reflect.Method m)
private static boolean
isValidTestMethod(java.lang.reflect.Method m)
private void
setUpFixture(java.lang.Object testObject)
private void
tearDownFixture(java.lang.Object testObject)
-
-
-
Field Detail
-
TEST_METHOD_PREFIX
private static final java.lang.String TEST_METHOD_PREFIX
- See Also:
- Constant Field Values
-
SETUP_METHOD_NAME
private static final java.lang.String SETUP_METHOD_NAME
- See Also:
- Constant Field Values
-
TEARDOWN_METHOD_NAME
private static final java.lang.String TEARDOWN_METHOD_NAME
- See Also:
- Constant Field Values
-
EMPTY_OBJECT_ARRAY
private static final java.lang.Object[] EMPTY_OBJECT_ARRAY
-
testClass
private final java.lang.Class<?> testClass
-
testMethods
private final java.util.Collection<java.lang.reflect.Method> testMethods
-
setUpMethod
private java.lang.reflect.Method setUpMethod
-
tearDownMethod
private java.lang.reflect.Method tearDownMethod
-
-
Method Detail
-
execute
public void execute(RunListener reportManager, java.lang.ClassLoader loader) throws TestSetFailedException
- Specified by:
execute
in interfaceSurefireTestSet
- Throws:
TestSetFailedException
-
executeTestMethods
private void executeTestMethods(RunListener reportManager) throws TestSetFailedException
- Throws:
TestSetFailedException
-
executeTestMethod
private boolean executeTestMethod(java.lang.reflect.Method method, RunListener reportManager) throws TestSetFailedException
- Throws:
TestSetFailedException
-
getTestName
private java.lang.String getTestName(java.lang.String testMethodName)
-
setUpFixture
private void setUpFixture(java.lang.Object testObject) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
tearDownFixture
private void tearDownFixture(java.lang.Object testObject) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
discoverTestMethods
private void discoverTestMethods()
-
isNoArgsInstanceMethod
private static boolean isNoArgsInstanceMethod(java.lang.reflect.Method m)
-
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()
-
-