Author: davsclaus
Date: Wed Dec 15 08:43:56 2010
New Revision: 1049457
URL: http://svn.apache.org/viewvc?rev=1049457&view=rev
Log:
CAMEL-3430: Fixed intercept send to endpoint with endpoints having parameters.
Added:
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInterceptSendToEndpointTest.java
(with props)
Added:
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInterceptSendToEndpointTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInterceptSendToEndpointTest.java?rev=1049457&view=auto
==============================================================================
---
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInterceptSendToEndpointTest.java
(added)
+++
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInterceptSendToEndpointTest.java
Wed Dec 15 08:43:56 2010
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.http;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.model.RouteDefinition;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+/**
+ * @version $Revision$
+ */
+public class HttpInterceptSendToEndpointTest extends CamelTestSupport {
+
+ @Test
+ public void testHttpInterceptSendToEndpoint() throws Exception {
+ RouteDefinition route = context.getRouteDefinitions().get(0);
+ route.adviceWith(context, new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+
interceptSendToEndpoint("http*").to("mock:http").skipSendToOriginalEndpoint();
+ }
+ });
+
+ getMockEndpoint("mock:http").expectedMessageCount(1);
+
+ template.sendBody("direct:start", "Hello World");
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("direct:start").to("http://localhost?a=1&b=2");
+ }
+ };
+ }
+}
Propchange:
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInterceptSendToEndpointTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInterceptSendToEndpointTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date