|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.groboutils.junit.v1.parser.JUnitOrigCreator
Emulates the construction mechanism for all JUnit versions.
| Constructor Summary | |
JUnitOrigCreator()
|
|
| Method Summary | |
boolean |
canCreate(java.lang.Class theClass)
Checks if the creator can be used on the given class. |
junit.framework.Test |
createTest(java.lang.Class theClass,
java.lang.reflect.Method method)
Creates a new test, based on the given class and method of the class. |
protected junit.framework.Test |
createTest(java.lang.Class theClass,
java.lang.Object[] constructorArgs)
Creates a new test class instance. |
protected java.lang.Object[] |
createTestArguments(java.lang.Class theClass,
java.lang.reflect.Method method)
|
protected java.lang.reflect.Constructor |
getConstructor(java.lang.Class theClass)
Discovers the constructor for the test class which will be used in the instantiation of a new instance of the class. |
protected java.lang.Class[] |
getConstructorArgTypes(java.lang.Class theClass)
Allows for pluggable constructor types. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JUnitOrigCreator()
| Method Detail |
public junit.framework.Test createTest(java.lang.Class theClass,
java.lang.reflect.Method method)
throws java.lang.InstantiationException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException,
java.lang.ClassCastException
createTest in interface ITestCreatortheClass - the class to parse for testing.
java.lang.InstantiationException - if there was a problem creating the
class.
java.lang.NoSuchMethodException - if the method does not exist in the
class.
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.ClassCastExceptioncreateTest( Class, Object[] )public boolean canCreate(java.lang.Class theClass)
canCreate in interface ITestCreatortheClass - the class to check if parsing is acceptable.
protected java.lang.reflect.Constructor getConstructor(java.lang.Class theClass)
throws java.lang.NoSuchMethodException
theClass - the class to parse for testing.
java.lang.NoSuchMethodException - if the class does not have a
constructor with the arguments returned by
getConstructorArgTypes.getConstructorArgTypes( Class ),
createTest( Class, Method ),
createTestArguments( Class, Method )protected java.lang.Class[] getConstructorArgTypes(java.lang.Class theClass)
theClass - the class to parse for testing.
protected java.lang.Object[] createTestArguments(java.lang.Class theClass,
java.lang.reflect.Method method)
theClass - the class to parse for testing.
protected junit.framework.Test createTest(java.lang.Class theClass,
java.lang.Object[] constructorArgs)
throws java.lang.InstantiationException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException,
java.lang.ClassCastException
theClass - the class to parse for testing.constructorArgs - arguments for the constructor retrieved through
getConstructor().
java.lang.InstantiationException - if a new instance could not be made
of the test class.
java.lang.NoSuchMethodException - if the constructor could not be found.
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.ClassCastExceptiongetConstructor( Class )
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||