Search in sources :

Example 1 with BeforeStory

use of org.jbehave.core.annotations.BeforeStory in project jbehave-core by jbehave.

the class DbUnitSteps method deleteAllData.

@BeforeStory
public void deleteAllData() throws SQLException, DatabaseUnitException {
    DatabaseDataSourceConnection dbConn = new DatabaseDataSourceConnection(dataSource);
    IDataSet dataSet = dbConn.createDataSet(new String[] { "ORGANIZATION", "APPLICATION_USER" });
    DatabaseOperation.DELETE_ALL.execute(dbConn, dataSet);
}
Also used : DatabaseDataSourceConnection(org.dbunit.database.DatabaseDataSourceConnection) IDataSet(org.dbunit.dataset.IDataSet) BeforeStory(org.jbehave.core.annotations.BeforeStory)

Aggregations

DatabaseDataSourceConnection (org.dbunit.database.DatabaseDataSourceConnection)1 IDataSet (org.dbunit.dataset.IDataSet)1 BeforeStory (org.jbehave.core.annotations.BeforeStory)1