summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/server/client-test.hpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2013-01-03 07:41:14 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2013-01-03 07:41:14 +0000
commit9e1b9e73145e00ea591bd1e0e9777625bad66dc9 (patch)
treec6563988970251cba763364bcddd33ac7fe23970 /sca-cpp/trunk/modules/server/client-test.hpp
parent157ca678dee75e7881a0198425d0c8328f0bee04 (diff)
Add support for HTTP patch and application of patch scripts to server and data store components.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1428192 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/server/client-test.hpp')
-rw-r--r--sca-cpp/trunk/modules/server/client-test.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/sca-cpp/trunk/modules/server/client-test.hpp b/sca-cpp/trunk/modules/server/client-test.hpp
index dc9ca299ad..29da9e4798 100644
--- a/sca-cpp/trunk/modules/server/client-test.hpp
+++ b/sca-cpp/trunk/modules/server/client-test.hpp
@@ -294,6 +294,21 @@ const bool testPut() {
return true;
}
+const bool testPatch() {
+ const gc_scoped_pool pool;
+ const list<value> i = nilListValue + "content" + (nilListValue + "item"
+ + (nilListValue + "name" + string("Apple"))
+ + (nilListValue + "price" + string("$2.99")));
+ const list<value> a = nilListValue + (nilListValue + "entry"
+ + (nilListValue + "title" + string("item"))
+ + (nilListValue + "id" + string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b"))
+ + i);
+ const http::CURLSession ch("", "", "", "", 0);
+ const value rc = content(http::patch(a, testURI + "/111", ch));
+ assert(rc == trueValue);
+ return true;
+}
+
const bool testDel() {
const gc_scoped_pool pool;
const http::CURLSession ch("", "", "", "", 0);
@@ -306,6 +321,7 @@ const bool testServer() {
tuscany::server::testGet();
tuscany::server::testPost();
tuscany::server::testPut();
+ tuscany::server::testPatch();
tuscany::server::testDel();
tuscany::server::testEval();
tuscany::server::testGetPerf();