You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2012/12/20 10:17:03 UTC

svn commit: r1424374 - /camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java

Author: davsclaus
Date: Thu Dec 20 09:17:02 2012
New Revision: 1424374

URL: http://svn.apache.org/viewvc?rev=1424374&view=rev
Log:
Added test

Added:
    camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java
      - copied, changed from r1424292, camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java

Copied: camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java (from r1424292, camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java?p2=camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java&p1=camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java&r1=1424292&r2=1424374&rev=1424374&view=diff
==============================================================================
--- camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java (original)
+++ camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java Thu Dec 20 09:17:02 2012
@@ -16,54 +16,22 @@
  */
 package org.apache.camel.component.ahc;
 
-import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.Test;
 
-public class AhcProduceGetTest extends BaseAhcTest {
+public class AhcClientConfigUriTest extends BaseAhcTest {
 
     @Test
     public void testAhcProduce() throws Exception {
-        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
-        template.sendBody("direct:start", null);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void testAhcProduceInOut() throws Exception {
-        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
-        template.requestBody("direct:start", null, String.class);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void testAhcProduceDirectly() throws Exception {
-        Object out = template.requestBody(getAhcEndpointUri(), null, String.class);
+        Object out = template.requestBody(getAhcEndpointUri() + "?clientConfig.IOThreadMultiplier=4", null, String.class);
         assertEquals("Bye World", out);
     }
 
-    @Test
-    public void testAhcProduceGetHeader() throws Exception {
-        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
-        template.sendBodyAndHeader("direct:start", null, Exchange.HTTP_METHOD, "GET");
-
-        assertMockEndpointsSatisfied();
-    }
-
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start")
-                    .to(getAhcEndpointUri())
-                    .to("mock:result");
-
                 from(getTestServerEndpointUri())
                         .transform(constant("Bye World"));
             }