Open mikebl71 opened 8 years ago
It would be great to also define the default assertion bean.
Thanks for your pull request. I've create another one, more complete because it also allow to defined default assertion bean and/or class.
https://github.com/springtestdbunit/spring-test-dbunit/pull/120
Problem to solve: I would like to implement a custom logic for validating actual vs expected datasets. Spring-dbunit uses DatabaseAssertion objects for such validations. However, at present, the ExpectedDatabase annotation only accepts DatabaseAssertionMode. But DatabaseAssertionMode is an enum, which means that I cannot extend it in my project.
Proposed solution: Similar to how you have "dataSetLoader" and "dataSetLoaderBean" elements in DbUnitConfiguration, I've added an "assertionBean" element to ExpectedDatabase. So now I can define any database assertion I like as a bean and refer to it in the annotation.
Example: