IDataSet dataSet = getXMLDataSet("rcst_m_customer.xml");
DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet)
/**
* getting Dataset from .xml file.
*
* @param fileName xml File Name
*
* @return Dataset for DBunit.
*/
private IDataSet getXMLDataSet(String fileName){
IDataSet dataSet = null;
try {
dataSet = new XmlDataSet(
this.getClass().getResourceAsStream(TESTDATA_PATH + fileName));
} catch (Throwable ex) {
ex.printStackTrace();
fail("getDataSet thrown exception : " + ex.getMessage());
}
return dataSet;
}
Thursday, January 17, 2008
Clean Insert with XML file
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment