You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2011/06/09 10:47:25 UTC
svn commit: r1133727 -
/camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpQueryTest.java
Author: ningjiang
Date: Thu Jun 9 08:47:25 2011
New Revision: 1133727
URL: http://svn.apache.org/viewvc?rev=1133727&view=rev
Log:
CAMEL-3779 Added a test of with url option of username and password
Modified:
camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpQueryTest.java
Modified: camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpQueryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpQueryTest.java?rev=1133727&r1=1133726&r2=1133727&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpQueryTest.java (original)
+++ camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpQueryTest.java Thu Jun 9 08:47:25 2011
@@ -58,10 +58,21 @@ public class HttpQueryTest extends BaseH
assertExchange(exchange);
}
+
+ @Test
+ public void httpQueryWithUsernamePassword() throws Exception {
+ Exchange exchange = template.request("http4://" + getHostName() + ":" + getPort() + "/user/pass?password=baa&username=foo", new Processor() {
+ public void process(Exchange exchange) throws Exception {
+ }
+ });
+
+ assertExchange(exchange);
+ }
@Override
protected void registerHandler(LocalTestServer server) {
server.register("/", new BasicValidationHandler("GET", "hl=en&q=camel", null, getExpectedContent()));
server.register("/test/", new BasicValidationHandler("GET", "my=@+camel", null, getExpectedContent()));
+ server.register("/user/pass", new BasicValidationHandler("GET", "password=baa&username=foo", null, getExpectedContent()));
}
}
\ No newline at end of file