This is an automated email from the ASF dual-hosted git repository. robertlazarski pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
The following commit(s) were added to refs/heads/master by this push: new 012ffc1 AP-6003 fix Moshi unit tests 012ffc1 is described below commit 012ffc1290511b3bc8d6175c6411d7e52a90e490 Author: Robert Lazarski <robertlazar...@gmail.com> AuthorDate: Fri Jun 18 04:31:44 2021 -1000 AP-6003 fix Moshi unit tests --- .../test/org/apache/axis2/json/moshi/rpc/JSONRPCIntegrationTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/json/test/org/apache/axis2/json/moshi/rpc/JSONRPCIntegrationTest.java b/modules/json/test/org/apache/axis2/json/moshi/rpc/JSONRPCIntegrationTest.java index 8d2a2f3..6ac0824 100644 --- a/modules/json/test/org/apache/axis2/json/moshi/rpc/JSONRPCIntegrationTest.java +++ b/modules/json/test/org/apache/axis2/json/moshi/rpc/JSONRPCIntegrationTest.java @@ -33,7 +33,9 @@ public class JSONRPCIntegrationTest { public void testJsonRpcMessageReceiver() throws Exception { String jsonRequest = "{\"echoPerson\":[{\"arg0\":{\"name\":\"Simon\",\"age\":\"35\",\"gender\":\"male\"}}]}"; String echoPersonUrl = server.getEndpoint("JSONPOJOService") + "echoPerson"; - String expectedResponse = "{\"response\":{\"name\":\"Simon\",\"age\":\"35\",\"gender\":\"male\"}}"; + // moshi uses alphabetical order, not field declaration order like gson + // String expectedResponse = "{\"response\":{\"name\":\"Simon\",\"age\":\"35\",\"gender\":\"male\"}}"; + String expectedResponse = "{\"response\":{\"age\":\"35\",\"gender\":\"male\",\"name\":\"Simon\"}}"; String response = UtilTest.post(jsonRequest, echoPersonUrl); Assert.assertNotNull(response); Assert.assertEquals(expectedResponse , response);