camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject svn commit: r1152948 - /camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyHttpGetWithParamAsExchangeHeaderTest.java
Date Mon, 01 Aug 2011 22:02:59 GMT
Author: cmueller
Date: Mon Aug  1 22:02:58 2011
New Revision: 1152948

URL: http://svn.apache.org/viewvc?rev=1152948&view=rev
Log:
added a test for a user forum issue

Modified:
    camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyHttpGetWithParamAsExchangeHeaderTest.java

Modified: camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyHttpGetWithParamAsExchangeHeaderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyHttpGetWithParamAsExchangeHeaderTest.java?rev=1152948&r1=1152947&r2=1152948&view=diff
==============================================================================
--- camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyHttpGetWithParamAsExchangeHeaderTest.java
(original)
+++ camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyHttpGetWithParamAsExchangeHeaderTest.java
Mon Aug  1 22:02:58 2011
@@ -19,6 +19,7 @@ package org.apache.camel.component.jetty
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -39,6 +40,29 @@ public class JettyHttpGetWithParamAsExch
 
         assertMockEndpointsSatisfied();
     }
+    
+    @Test
+    public void testHttpGetWithUTF8EncodedParamsViaURI() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedHeaderReceived("message", "Keine gŸltige GPS-Daten!");
+        mock.expectedHeaderReceived(Exchange.HTTP_METHOD, "GET");
+
+        template.requestBody(serverUri + "?message=Keine%20g%C3%BCltige%20GPS-Daten!", null,
Object.class);
+
+        assertMockEndpointsSatisfied();
+    }
+    
+    @Test
+    @Ignore
+    public void testHttpGetWithISO8859EncodedParamsViaURI() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedHeaderReceived("message", "Keine gŸltige GPS-Daten!");
+        mock.expectedHeaderReceived(Exchange.HTTP_METHOD, "GET");
+
+        template.requestBody(serverUri + "?message=Keine+g%FCltige+GPS-Daten%21", null, Object.class);
+
+        assertMockEndpointsSatisfied();
+    }
 
     @Test
     public void testHttpGetWithParamsViaHeader() throws Exception {



Mime
View raw message