How can I ignore the comparison of some columns using ExpectedDataSet annotation?

  • I use dbunit API.
有帮助吗?

解决方案

In spring using spring-test-dbunit, you can write:

@ExpectedDatabase(value="yourdataset.xml", assertionMode=DatabaseAssertionMode.NON_STRICT)

and omit the columns on "yourdataset.xml"

ref: http://springtestdbunit.github.io/spring-test-dbunit/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top