net.sourceforge.groboutils.junit.v1.parser
Class JUnit3_8Creator
java.lang.Object
net.sourceforge.groboutils.junit.v1.parser.JUnit3_8Creator
- All Implemented Interfaces:
- ITestCreator
- public class JUnit3_8Creator
- extends java.lang.Object
- implements ITestCreator
Emulates the JUnit 3.8+ construction mechanism.
- Since:
- November 3, 2002
- Version:
- $Date: 2003/02/10 22:52:21 $
- Author:
- Matt Albrecht groboclown@users.sourceforge.net
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JUnit3_8Creator
public JUnit3_8Creator()
canCreate
public boolean canCreate(java.lang.Class theClass)
- Checks if the creator can be used on the given class.
- Specified by:
canCreate
in interface ITestCreator
- Parameters:
theClass
- the class to check if parsing is acceptable.
- Returns:
- whether the creator can generate a test based on
theClass.
createTest
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
- Creates a new test, based on the given class and method of the
class.
- Specified by:
createTest
in interface ITestCreator
- Parameters:
theClass
- the class to parse for testing.
- Returns:
- the generated test, or null if the test could not
be created.
- Throws:
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.ClassCastException
Copyright © 2001-2003 by The GroboUtils Project