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/08/16 10:34:24 UTC
svn commit: r1158153 -
/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java
Author: ningjiang
Date: Tue Aug 16 08:34:23 2011
New Revision: 1158153
URL: http://svn.apache.org/viewvc?rev=1158153&view=rev
Log:
CAMEL-4336 clean up the test code
Modified:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java
Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java?rev=1158153&r1=1158152&r2=1158153&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java Tue Aug 16 08:34:23 2011
@@ -25,6 +25,11 @@ import org.apache.http.util.EntityUtils;
import org.junit.Test;
public class CxfConusmerNamespacePayLoadTest extends CxfConsumerPayloadTest {
+ private static final String ECHO_RESPONSE = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+ + "<soap:Body><ns1:echoResponse xmlns:ns1=\"http://cxf.component.camel.apache.org/\">"
+ + "<return xmlns=\"http://cxf.component.camel.apache.org/\">echo Hello World!</return>"
+ + "</ns1:echoResponse></soap:Body></soap:Envelope>";
+
private static final String ECHO_REQUEST = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" "
+ "xmlns:ns1=\"http://cxf.component.camel.apache.org/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
+ "xmlns:ns2=\"http://cxf.component.camel.apache.org/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body>"
@@ -49,11 +54,10 @@ public class CxfConusmerNamespacePayLoad
try {
HttpResponse response = httpclient.execute(post);
- //assertEquals(200, response.getStatusLine().getStatusCode());
+ assertEquals(200, response.getStatusLine().getStatusCode());
String responseBody = EntityUtils.toString(response.getEntity());
- System.out.println(responseBody);
- //assertEquals("Get a wrong response", correct, responseBody);
+ assertEquals("Get a wrong response", ECHO_RESPONSE, responseBody);
} finally {
httpclient.getConnectionManager().shutdown();
}