SWS-1035 - XMLUnit migration from 1.5 to 2.6.2 #122
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Basically I replaced the use of
org.custommonkey.xmlunit.XMLAssert.assertXMLEqual()
with
org.xmlunit.assertj.XmlAssert.assertThat(x).and(y).areSimilar()
following the example in https://github.com/xmlunit/xmlunit#comparing-two-documents using AssertJ.
I also corrected an error at
https://github.com/spring-projects/spring-ws/compare/master...leaqui:SWS-1035?expand=1#diff-267dffc46eb1bcd24a2daf06428aff1eL59
there, the
assertXMLSimilar()
method, was wrong. It returns the opposite of what is needed. The error resides in thefalse
argument oforg.custommonkey.xmlunit.XMLAssert.assertXMLEqual(compareXML(expectedDocument, resultDocument), false)
Also, I have to change the order of some tags at
https://github.com/spring-projects/spring-ws/compare/master...leaqui:SWS-1035?expand=1#diff-66472375685665e43f5a84d2d94670e9
https://github.com/spring-projects/spring-ws/compare/master...leaqui:SWS-1035?expand=1#diff-e7691ec6d1c488508fb11504c2940815
https://github.com/spring-projects/spring-ws/compare/master...leaqui:SWS-1035?expand=1#diff-57144daa10fc56222a5673f414b4d6bd
https://github.com/spring-projects/spring-ws/compare/master...leaqui:SWS-1035?expand=1#diff-74695df9f89dcef0db6c8590fde8c1e3
https://github.com/spring-projects/spring-ws/compare/master...leaqui:SWS-1035?expand=1#diff-539160ae71b2fb6cb54315dfee3c7bcc
https://github.com/spring-projects/spring-ws/compare/master...leaqui:SWS-1035?expand=1#diff-f52c5ff62d1a2592fed7ae4b710d5a91
because by default element order is significant in XMLUnit 2.x
Migration of spring-ws-test didn´t need for a major refactor. The biggest changes are at:
https://github.com/spring-projects/spring-ws/compare/master...leaqui:SWS-1035?expand=1#diff-741b860aab67e4e1290d660e6bd57210
https://github.com/spring-projects/spring-ws/compare/master...leaqui:SWS-1035?expand=1#diff-9b4789291a43675fa7cb8a7d64d622f7