camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] camel git commit: CAMEL-8565 Polish the unit test code
Date Mon, 30 Mar 2015 01:32:10 GMT
CAMEL-8565 Polish the unit test code


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/88fe5dd1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/88fe5dd1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/88fe5dd1

Branch: refs/heads/master
Commit: 88fe5dd1e68bd1bdfa1527cb46a0af97304301fc
Parents: e4d64b8
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Mon Mar 30 09:31:40 2015 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Mon Mar 30 09:31:40 2015 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/gson/GsonMarshalListTest.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/88fe5dd1/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalListTest.java
----------------------------------------------------------------------
diff --git a/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalListTest.java
b/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalListTest.java
index 57af054..aa17ca9 100644
--- a/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalListTest.java
+++ b/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalListTest.java
@@ -50,9 +50,8 @@ public class GsonMarshalListTest extends CamelTestSupport {
         mock.message(0).body().isInstanceOf(List.class);
         mock.message(0).body().equals(inList);
 
-        Object marshalled = template.requestBody("direct:inPojo", inList);
-        String marshalledAsString = context.getTypeConverter().convertTo(String.class, marshalled);
-        assertEquals("[{\"name\":\"Camel1\"},{\"name\":\"Camel2\"}]", marshalledAsString);
+        String marshalled = template.requestBody("direct:inPojo", inList, String.class);
+        assertEquals("[{\"name\":\"Camel1\"},{\"name\":\"Camel2\"}]", marshalled);
 
         template.sendBody("direct:backPojo", marshalled);
 


Mime
View raw message