net.bpelunit.utils.datasourceinliner
Class Inliner
java.lang.Object
net.bpelunit.utils.datasourceinliner.Inliner
public class Inliner
- extends Object
Data source inliner for BPELUnit test suite specifications in BPTS format.
Test case templates are expanded: each is repeated as many times as there are
rows in the effective data source. All data sources and the test suite setup
script are removed. Each of the resulting test cases get a setup script which
concatenates the old test suite setup script, the old test case setup script,
and a set of variable assignments which match the variables contained in the
corresponding row of the data source. The rest of the BPTS remains unchanged,
in order to be forwards compatible. In particular, delaySequences are *NOT*
modified.
- Author:
- Antonio García-Domínguez
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Inliner
public Inliner()
inlineDataSources
public XMLTestSuiteDocument inlineDataSources(XMLTestSuiteDocument xmlOldSuiteDoc,
File bptsDir,
BPELUnitRunner runner)
throws org.apache.xmlbeans.XmlException,
DataSourceException
- Expands the data sources in the BPTS so test cases are independent from
each other. See the class Javadoc for more details.
- Parameters:
xmlOldSuiteDoc - XMLTestSuiteDocument produced by parsing the original BPTS
using XMLTestSuiteDocument.Factory#parse.bptsDir - File of the directory which contains the BPTS, from which
relative paths in the original BPTS will be interpreted.runner - Runner which will be used to create the data source.
- Throws:
org.apache.xmlbeans.XmlException - Could not clone the original XML tree.
DataSourceException - Could not access one of the rows of the data source.
inlineFile
public void inlineFile(File fSource,
File fDestination,
BPELUnitRunner runner)
throws org.apache.xmlbeans.XmlException,
IOException,
DataSourceException
- Inlines the data sources in a .bpts file and saves the resulting test
suite to another file.
- Parameters:
fSource - Original .bpts file to be modified.fDestination - Destination file for the modified test suite specification.
- Throws:
org.apache.xmlbeans.XmlException - Could not parse the original .bpts or dump the modified .bpts
back as XML.
IOException - Could not open fOriginal or fTemp or there was an I/O error
while manipulating them.
DataSourceException - Could not read one of the rows of one of the data sources in
the BPTS file.
Copyright © 2012 Leibniz Universität Hannover. All Rights Reserved.