summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-02-28 19:29:18 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-02-28 19:29:18 +0000
commit64e2486555a0a14f7d9690c2fc62c30bde803a91 (patch)
tree88f3b5c1ab25675a7978429bf044a5e9481fb9e4
parent6bbf2028c7fe6464df58f6b25481a5203bba0a1c (diff)
Fixed ATOM test cases, return ATOM entry id as a string instead of an iterable.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@917263 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-cpp/trunk/modules/java/test/ServerImpl.java22
-rw-r--r--sca-cpp/trunk/modules/python/server-test.py2
-rw-r--r--sca-cpp/trunk/modules/server/server-test.scm4
3 files changed, 14 insertions, 14 deletions
diff --git a/sca-cpp/trunk/modules/java/test/ServerImpl.java b/sca-cpp/trunk/modules/java/test/ServerImpl.java
index d979c20a15..05012c22cf 100644
--- a/sca-cpp/trunk/modules/java/test/ServerImpl.java
+++ b/sca-cpp/trunk/modules/java/test/ServerImpl.java
@@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package test;
@@ -22,30 +22,30 @@ package test;
import static org.apache.tuscany.IterableUtil.*;
public class ServerImpl {
-
- public String echo(String x) {
+
+ public String echo(final String x) {
return x;
}
-
- public Iterable<?> get(Iterable<String> id) {
+
+ public Iterable<?> get(final Iterable<String> id) {
if (isNil(id))
return list("Sample Feed", "123456789",
list("Item", "111", list(list("'javaClass", "services.Item"), list("'name", "Apple"), list("'currencyCode", "USD"), list("'currencySymbol", "$"), list("'price", 2.99))),
list("Item", "222", list(list("'javaClass", "services.Item"), list("'name", "Orange"), list("'currencyCode", "USD"), list("'currencySymbol", "$"), list("'price", 3.55))),
list("Item", "333", list(list("'javaClass", "services.Item"), list("'name", "Pear"), list("'currencyCode", "USD"), list("'currencySymbol", "$"), list("'price", 1.55))));
- Iterable<?> entry = list(list("'javaClass", "services.Item"), list("'name", "Apple"), list("'currencyCode", "USD"), list("'currencySymbol", "$"), list("'price", 2.99));
- return list("Item", id, entry);
+ final Iterable<?> entry = list(list("'javaClass", "services.Item"), list("'name", "Apple"), list("'currencyCode", "USD"), list("'currencySymbol", "$"), list("'price", 2.99));
+ return list("Item", car(id), entry);
}
- public Iterable<String> post(Iterable<String> collection, Iterable<?> item) {
+ public Iterable<String> post(final Iterable<String> collection, final Iterable<?> item) {
return list("123456789");
}
-
- public Boolean put(Iterable<String> id, Iterable<?> item) {
+
+ public Boolean put(final Iterable<String> id, final Iterable<?> item) {
return true;
}
- public Boolean delete(Iterable<String> id) {
+ public Boolean delete(final Iterable<String> id) {
return true;
}
}
diff --git a/sca-cpp/trunk/modules/python/server-test.py b/sca-cpp/trunk/modules/python/server-test.py
index 61e177d0aa..8e6b79b56a 100644
--- a/sca-cpp/trunk/modules/python/server-test.py
+++ b/sca-cpp/trunk/modules/python/server-test.py
@@ -30,7 +30,7 @@ def get(id):
("Item", "333", (("'javaClass", "services.Item"), ("name", "Pear"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 1.55))))
entry = (("'javaClass", "services.Item"), ("'name", "Apple"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 2.99))
- return ("Item", id, entry)
+ return ("Item", id[0], entry)
def post(collection, item):
return ("123456789",)
diff --git a/sca-cpp/trunk/modules/server/server-test.scm b/sca-cpp/trunk/modules/server/server-test.scm
index 7efb6ffeed..5d545ecf8b 100644
--- a/sca-cpp/trunk/modules/server/server-test.scm
+++ b/sca-cpp/trunk/modules/server/server-test.scm
@@ -27,8 +27,8 @@
("Item" "111" ((javaClass "services.Item") (name "Apple") (currencyCode "USD") (currencySymbol "$") (price 2.99)))
("Item" "222" ((javaClass "services.Item") (name "Orange") (currencyCode "USD") (currencySymbol "$") (price 3.55)))
("Item" "333" ((javaClass "services.Item") (name "Pear") (currencyCode "USD") (currencySymbol "$") (price 1.55))))
-
- '("Item" "111" ((javaClass "services.Item") (name "Apple") (currencyCode "USD") (currencySymbol "$") (price 2.99))))
+
+ (list "Item" (car id) '((javaClass "services.Item") (name "Apple") (currencyCode "USD") (currencySymbol "$") (price 2.99))))
)
(define (post collection item)