rmpestano / dbunit-rules

https://github.com/database-rider/database-rider
15 stars 5 forks source link

Raw SQL support #14

Closed Toilal closed 8 years ago

Toilal commented 8 years ago

Would it be possible to add support of raw SQL script datasets ? It seems not to be supported by by DbUnit itself, but could be handy in some cases though.

rmpestano commented 8 years ago

Hi @Toilal, you can execute sql scripts before and after, it helps for your case?

see here https://github.com/rmpestano/dbunit-rules/blob/master/core/src/test/java/com/github/dbunit/rules/DBUnitRulesIt.java#L65

rmpestano commented 8 years ago

Currently we have only executeStatementsBefore but I think it would be useful to have scripts execution before tests where statements are separated by ';' inside a .sql script.

rmpestano commented 8 years ago

Hi again @Toilal,

It should be fixed now, you can use this test as reference.

Any problem just come back here, thanks for your feedback so far.

PS: its available on central snapshots.