Thanks to Jeremy Stein who has submitted multiple patches. @author Manuel Laflamme @author Eric Pugh @author Last changed by: $Author: gommma $ @version $Revision: 934 $ $Date: 2008-12-31 23:29:25 +0100 (mer, 31 dic 2008) $ @since 1.4 (Apr 9, 2002)
173174175176177178179180181182183
IDataSet[] dataSets = new IDataSet[dataSetStream.length]; for (int i = 0; i < dataSetStream.length; i++) { dataSets[i] = getData(dataSetStream[i]); } databaseTester.setDataSet(new CompositeDataSet(dataSets)); new InsertIdentityOperation(DatabaseOperation.INSERT).execute(connection, databaseTester.getDataSet()); } catch (Exception e) { throw translateException("Could not setup DBUnit data", e); } finally { closeDbUnitConnection(connection); }
222223224225226227228229230231232
for (int i = 0; i < dataSetStream.length; i++) { dataSets[i] = dbUnitDataSet(dataSetStream[i]); } tester.setDataSet(new CompositeDataSet(dataSets)); connection = dbUnitConnection(); new InsertIdentityOperation(DatabaseOperation.INSERT).execute(connection, tester.getDataSet()); } catch (Exception e) { throw translateException("Could not setup DBUnit data", e); } finally { closeQuietly(connection); }
150151152153154155156157158159160
} databaseTester.setDataSet(new CompositeDataSet(dataSets)); connection = createConnection(); new InsertIdentityOperation(DatabaseOperation.INSERT).execute(connection, databaseTester.getDataSet()); } catch (Exception e) { throw translateException("Could not setup DBUnit data", e); } finally { closeQuietly(connection); }
1819202122232425
super(dataSource); } @Override protected void execute(DatabaseOperation operation, String dbUnitXmlPath) { operation = new InsertIdentityOperation(operation); super.execute(operation, dbUnitXmlPath); }