|
From: Will H. <wjh...@gm...> - 2015-02-11 18:21:55
|
Hello Everyone,
I've been in contact with Stefan Bodewig about an issue I encountered with XMLUnit 2.0 and I'd like to help out to fix it!
The main GitHub page provides an example of how to test a comparison, which includes the following code:
Assert.fail("found a difference: " + comparison);
The trouble with this is that the Comparison class does not have a toString() message, thus the assertion failure just shows the Comparison's memory location and is useless to someone reading the error log. I'd like to rectify that by adding a proper toString() method.
Stefan had suggested delegating the creation of the toString() to ComparisonFormatter and it looks like DefaultComparisonFormatter would do the trick and be pretty simple to implement. Would this be an acceptable solution?
Thanks in Advance,
-Will Herrmann |