camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [camel] branch master updated: CAMEL-12306: Added unit test
Date Thu, 01 Mar 2018 08:39:52 GMT
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new e0611b7  CAMEL-12306: Added unit test
e0611b7 is described below

commit e0611b7a3599c019356d31ce5d405dc7f95d269e
Author: Claus Ibsen <claus.ibsen@gmail.com>
AuthorDate: Thu Mar 1 09:39:34 2018 +0100

    CAMEL-12306: Added unit test
---
 .../jackson/converter/JacksonConversionsSimpleTest.java        | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/converter/JacksonConversionsSimpleTest.java
b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/converter/JacksonConversionsSimpleTest.java
index 3f05880..6a9799a 100644
--- a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/converter/JacksonConversionsSimpleTest.java
+++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/converter/JacksonConversionsSimpleTest.java
@@ -21,6 +21,7 @@ import java.util.Map;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
 import org.apache.camel.component.jackson.JacksonConstants;
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -67,4 +68,13 @@ public class JacksonConversionsSimpleTest extends CamelTestSupport {
         assertNull(convertedObject);
     }
 
+    @Test
+    public void shouldNotConvertStringToEnum() {
+        Exchange exchange = new DefaultExchange(context);
+
+        Object convertedObject = context.getTypeConverter().convertTo(ExchangePattern.class,
exchange, "InOnly");
+
+        assertEquals(ExchangePattern.InOnly, convertedObject);
+    }
+
 }

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

Mime
View raw message