net.sourceforge.groboutils.junit.v1.parser
Interface ITestCreator

All Known Implementing Classes:
DelegateTestCreator, IftcOrigCreator, JUnit3_8Creator, JUnitOrigCreator

public interface ITestCreator

Interface that can create test objects based on a class and a method from within that class, using a specific method. Also provides means to check the class object to see if the implementation can instantiate the test class.

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.
 

Method Detail

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.

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

canCreate

public boolean canCreate(java.lang.Class theClass)
Checks if the creator can be used on the given class.

Parameters:
theClass - the class to check if parsing is acceptable.
Returns:
whether the creator can generate a test based on theClass.


Copyright © 2001-2003 by The GroboUtils Project