You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2010/02/28 20:29:19 UTC

svn commit: r917263 - in /tuscany/sca-cpp/trunk/modules: java/test/ServerImpl.java python/server-test.py server/server-test.scm

Author: jsdelfino
Date: Sun Feb 28 19:29:18 2010
New Revision: 917263

URL: http://svn.apache.org/viewvc?rev=917263&view=rev
Log:
Fixed ATOM test cases, return ATOM entry id as a string instead of an iterable.

Modified:
    tuscany/sca-cpp/trunk/modules/java/test/ServerImpl.java
    tuscany/sca-cpp/trunk/modules/python/server-test.py
    tuscany/sca-cpp/trunk/modules/server/server-test.scm

Modified: tuscany/sca-cpp/trunk/modules/java/test/ServerImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/java/test/ServerImpl.java?rev=917263&r1=917262&r2=917263&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/java/test/ServerImpl.java (original)
+++ tuscany/sca-cpp/trunk/modules/java/test/ServerImpl.java Sun Feb 28 19:29:18 2010
@@ -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 @@
 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;
     }
 }

Modified: tuscany/sca-cpp/trunk/modules/python/server-test.py
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/server-test.py?rev=917263&r1=917262&r2=917263&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/python/server-test.py (original)
+++ tuscany/sca-cpp/trunk/modules/python/server-test.py Sun Feb 28 19:29:18 2010
@@ -30,7 +30,7 @@
             ("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",)

Modified: tuscany/sca-cpp/trunk/modules/server/server-test.scm
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/server-test.scm?rev=917263&r1=917262&r2=917263&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/server-test.scm (original)
+++ tuscany/sca-cpp/trunk/modules/server/server-test.scm Sun Feb 28 19:29:18 2010
@@ -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)