camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject git commit: Checked the status code of the delete operation in camel-cxf unit test
Date Tue, 23 Sep 2014 01:20:57 GMT
Repository: camel
Updated Branches:
  refs/heads/master 91e4b4fe3 -> d3299ce23


Checked the status code of the delete operation in camel-cxf unit test


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d3299ce2
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d3299ce2
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d3299ce2

Branch: refs/heads/master
Commit: d3299ce2385c5387e848c26b34bab52214c41ea6
Parents: 91e4b4f
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Tue Sep 23 09:20:16 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Tue Sep 23 09:20:35 2014 +0800

----------------------------------------------------------------------
 .../apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d3299ce2/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
index 48be39c..e67f537 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
@@ -162,7 +162,9 @@ public class CxfRsRouterTest extends CamelSpringTestSupport {
                          EntityUtils.toString(response.getEntity()));
             
             HttpDelete del = new HttpDelete("http://localhost:" + getPort() + "/CxfRsRouterTest/route/customerservice/customers/124/");
-            httpclient.execute(del);
+            response = httpclient.execute(del);
+            // need to check the response of delete method
+            assertEquals(200, response.getStatusLine().getStatusCode());
         } finally {
             httpclient.close();
         }
@@ -185,7 +187,9 @@ public class CxfRsRouterTest extends CamelSpringTestSupport {
                          EntityUtils.toString(response.getEntity()));
 
             HttpDelete del = new HttpDelete("http://localhost:" + getPort() + "/CxfRsRouterTest/route/customerservice/customers/124/");
-            httpclient.execute(del);
+            response = httpclient.execute(del);
+            // need to check the response of delete method
+            assertEquals(200, response.getStatusLine().getStatusCode());
         } finally {
             httpclient.close();
         }


Mime
View raw message