Closed viktormelnychuk closed 2 weeks ago
This is a breaking change as it stands. I think we'd need to introduce a parameter similar to the ignore order one in equalToJson
to avoid this.
@tomakehurst Hi!
I changed the implementation per your recommendations. Added a parameter and tried to follow the equalToJson
implementation
Please can you run ./gradlew spotlessApply
and push the results?
Run it, sorry
Ignores the order of nodes on the same level by applying secondary sorting by the text content of the node. This allows to match requests where there can be multiple same tags in arbitrary order Given example configuration:
Will match
and match
Added property to enable secondary sort by node text content. The property name is
ignoreOrderOfSameNode
. Tried to follow pattern similar toequalToJson
implementation. Update existingequalToXml
static methods to passnull
value as the parameter to preserve existing behavior. Added two additionalequalToXml
overloads that accept theignoreOrderOfSameNode
parameter: where we don't use placeholder delimitersand
where we do use placeholder delimiters.
Docs are also updated and PR raised to reflect changes:
References
Submitter checklist
#help-contributing
or a project-specific channel like#wiremock-java