From d683dc4b30c79348b5e73f0f11b1cfd8ce4b9812 Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 19 May 2010 00:53:52 +0000 Subject: Merge branch 'jaxrs' into trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@945980 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/binding/jsonrpc/JSONRPCDataTypeTestCase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc') diff --git a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCDataTypeTestCase.java b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCDataTypeTestCase.java index b84df66f40..0fd622d29b 100644 --- a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCDataTypeTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCDataTypeTestCase.java @@ -133,7 +133,7 @@ public class JSONRPCDataTypeTestCase { @Test public void testList() throws Exception { JSONObject jsonRequest = new JSONObject( - "{ \"method\": \"echoList\", \"params\": [ {\"javaClass\": \"java.util.ArrayList\", \"list\": [0,1,2,3,4]}], \"id\": 8}"); + "{ \"method\": \"echoList\", \"params\": [[0,1,2,3,4]], \"id\": 8}"); WebConversation wc = new WebConversation(); WebRequest request = new PostMethodWebRequest(SERVICE_URL, @@ -144,7 +144,7 @@ public class JSONRPCDataTypeTestCase { JSONObject jsonResp = new JSONObject(response.getText()); - Assert.assertEquals(0, jsonResp.getJSONObject("result").getJSONArray("list").get(0)); + Assert.assertEquals(0, jsonResp.getJSONArray("result").get(0)); } @Test @@ -186,7 +186,7 @@ public class JSONRPCDataTypeTestCase { @Test public void testSet() throws Exception { JSONObject jsonRequest = new JSONObject( - "{ \"method\": \"echoSet\", \"params\": [ {\"javaClass\": \"java.util.HashSet\", \"set\": {\"1\": \"red\", \"2\": \"blue\"}}],\"id\": 11}"); + "{ \"method\": \"echoSet\", \"params\": [[\"red\", \"blue\"]],\"id\": 11}"); WebConversation wc = new WebConversation(); WebRequest request = new PostMethodWebRequest(SERVICE_URL, @@ -197,6 +197,6 @@ public class JSONRPCDataTypeTestCase { JSONObject jsonResp = new JSONObject(response.getText()); - Assert.assertEquals("red", jsonResp.getJSONObject("result").getJSONObject("set").getString("red")); + Assert.assertEquals("red", jsonResp.getJSONArray("result").get(0)); } } \ No newline at end of file -- cgit v1.2.3