I am writing a JUnit test case which want to test whether a particular file is added with some content or not. In that case, I want to get the instance of the file before modification and another file instance of the same file after modification and want to check whether both are not equal. how to do that in Java Junit ?
There are tools that exist for this purpose, e.g. http://xmlunit.sourceforge.net/
XMLUnit can ignore whitespace and formatting which I would imagine are immaterial and will also handle comparing
<stuff/>
and
<stuff></stuff>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With