citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
459 stars 137 forks source link

JsonTextMessageValidator should ignore order of json array items #1101

Closed novarx closed 9 months ago

novarx commented 10 months ago

Citrus Version

4.1.0

Context

JsonTextMessageValidator#validateMessage

Expected behavior

The validation of a given json array, compared to a control json, should ignore the order of array items. i.e. the follwing "recived-json"

{ "books": ["book-c", "book-b", "book-a"] }

should throw no ValidationException when compared with the follwing "control-json"

{ "books": ["book-a", "book-b", "book-c"] }

Actual behavior

The item ordering is always asserted, even when not in strict mode.

Test case sample

See Pull Request (#1102)

bbortt commented 9 months ago

fixed in https://github.com/citrusframework/citrus/pull/1102.