mercredi 22 avril 2015

IDataSet manipulation in DBunit

I use IDataSet to read from a XML file and write to my database so I can run the Junit test against my database. problem is my senario is becoming to complicated and I need to change the data in the database in middle of test.

I was looking for a way to change the IDataSet data without reading from XML file and write to database, this way I don't have to create couple of huge XML files just to change one row!

my code currently is something like this

IDataSet dataSet  = new XmlDataSet(fileStream);
DatabaseOperation.CLEAN_INSERT.execute(jdbcConnection, dataSet);

Aucun commentaire:

Enregistrer un commentaire