org.junitext.runners.parameters.factory
Class DigesterParameterFactory
java.lang.Object
org.junitext.runners.parameters.factory.DigesterParameterFactory
- All Implemented Interfaces:
- ParameterFactory
public class DigesterParameterFactory
- extends java.lang.Object
- implements ParameterFactory
Creates sets of test parameters by parsing input XML using the Jakarta
commons-digester.
|
Method Summary |
java.util.List<ParameterSet> |
createParameters(java.lang.Class<?> testClass,
java.io.File xmlFile)
Creates sets of test parameters from a given XML File. |
java.util.List<ParameterSet> |
createParameters(java.io.InputStream xmlInput)
Creates sets of test parameters by parsing input XML using the Jakarta
commons-digester. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DigesterParameterFactory
public DigesterParameterFactory()
createParameters
public java.util.List<ParameterSet> createParameters(java.lang.Class<?> testClass,
java.io.File xmlFile)
throws java.lang.Exception
- Description copied from interface:
ParameterFactory
- Creates sets of test parameters from a given XML File. In addition to the
XML File
File object, the test class is also passed. This
allows implementors to use properties of the test class to create the
test parameters.
NOTE: It is possible to receive an invalid or
null xmlFile. It is the responsibility of implementors of
the ParameterFactory to decide how to handle not found or
missing XML files.
- Specified by:
createParameters in interface ParameterFactory
- Parameters:
testClass - the test classxmlFile - the XML File to parse and generate parameters from
- Returns:
- a collection of sets of JavaBeans that are used as test
parameters
- Throws:
java.lang.Exception - if there is a problem parsing the XML file- See Also:
ParameterFactory.createParameters(java.lang.Class,
java.io.File)
createParameters
public java.util.List<ParameterSet> createParameters(java.io.InputStream xmlInput)
throws java.lang.Exception
- Creates sets of test parameters by parsing input XML using the Jakarta
commons-digester.
- Parameters:
xmlInput - an InputStream containing the XML to parse
- Returns:
- the sets of test parameters
- Throws:
java.lang.Exception