[ 
https://issues.apache.org/jira/browse/CAMEL-22865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18053645#comment-18053645
 ] 

Thomas Cunningham commented on CAMEL-22865:
-------------------------------------------

[~gnodet] I spent a bit of time looking at this and ended up working around it 
by grabbing the result from the mock's body and then using 
JSONAssert.assertEquals on that.     It'd be nice if the mock could assert on 
JSON irrespective of order but I also think doing something like

 
{code:java}
String received = mock.message(0).body(String.class);
JSONAssert.assertEquals(received, expected, false);
{code}
works fine as a workaround.

 

> Add a method to MockValueBuilder that allows json comparison that ignores 
> element order
> ---------------------------------------------------------------------------------------
>
>                 Key: CAMEL-22865
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22865
>             Project: Camel
>          Issue Type: Task
>          Components: camel-mock
>            Reporter: Thomas Cunningham
>            Assignee: Guillaume Nodet
>            Priority: Major
>
> Add a method to MockValueBuilder that allows json comparison that ignores 
> element order



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to