Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以跳过 DBUnit 中的列验证?
我更喜欢使用FlatXmlDataSet,因为它更容易维护。但是为了比较结果,我必须使用XmlDataSet它总是在 table 标记后面的所有列。
FlatXmlDataSet
XmlDataSet
该Assertion方法assertEqualsIgnoreCols可能是一种解决方案,因为它允许我指定要忽略的列,但有很多列,我不想手动添加它们。:-(
Assertion
assertEqualsIgnoreCols
看看Ignoring some columns in comparison,你也可以看看How to exclude some table columns at runtime?