diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-19 02:27:31 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-19 02:27:31 +0000 |
commit | a19a7d3f51c1f079c99003b1f67768a386584e90 (patch) | |
tree | a540799dcc58c80a5246a656d2b004f54f166f5f /sca-cpp/trunk/samples/store-scheme/server-test | |
parent | c59c7ef6db1f5c6458109f0627a8853c7f162f80 (diff) |
Add more JSON and ATOMPub test cases.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@965342 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rwxr-xr-x | sca-cpp/trunk/samples/store-scheme/server-test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sca-cpp/trunk/samples/store-scheme/server-test b/sca-cpp/trunk/samples/store-scheme/server-test index e50467be98..dd94ccabde 100755 --- a/sca-cpp/trunk/samples/store-scheme/server-test +++ b/sca-cpp/trunk/samples/store-scheme/server-test @@ -30,6 +30,24 @@ $curl_prefix/bin/curl http://localhost:8090/ 2>/dev/null >tmp/index.html diff tmp/index.html htdocs/index.html rc=$? +# Test Catalog +if [ "$rc" = "0" ]; then + $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X POST -H "Content-type: application/json-rpc" --data @../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt 2>/dev/null + diff tmp/getcatalog-result.txt ../store-cpp/htdocs/test/getcatalog-result.txt + rc=$? +fi + +# Test Shopping Cart +if [ "$rc" = "0" ]; then + $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart -X POST -H "Content-type: application/atom+xml" --data @../store-cpp/htdocs/test/shopping-cart-entry.xml 2>/dev/null + rc=$? +fi +if [ "$rc" = "0" ]; then + $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart >tmp/shopping-cart-feed.xml 2>/dev/null + grep "3.55" tmp/shopping-cart-feed.xml >/dev/null + rc=$? +fi + # Cleanup ./stop sleep 2 |