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 static java.lang.StringSETUP_METHOD_NAMEprivate java.lang.reflect.MethodsetUpMethodprivate static java.lang.StringTEARDOWN_METHOD_NAMEprivate java.lang.reflect.MethodtearDownMethodprivate static java.lang.StringTEST_METHOD_PREFIXprivate java.lang.Class<?>testClassprivate 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 voiddiscoverTestMethods()voidexecute(RunListener reportManager, java.lang.ClassLoader loader)private booleanexecuteTestMethod(java.lang.reflect.Method method, RunListener reportManager)private voidexecuteTestMethods(RunListener reportManager)java.lang.StringgetName()private java.lang.Class<?>getTestClass()private java.lang.StringgetTestName(java.lang.String testMethodName)private static booleanisNoArgsInstanceMethod(java.lang.reflect.Method m)private static booleanisValidTestMethod(java.lang.reflect.Method m)private voidsetUpFixture(java.lang.Object testObject)private voidtearDownFixture(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:
executein 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:
getNamein interfaceSurefireTestSet
-
getTestClass
private java.lang.Class<?> getTestClass()
-
-