tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r511265 - in /incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests: ./ src/main/resources/META-INF/sca/ src/main/resources/helloworld/ src/test/java/helloworld/
Date Sat, 24 Feb 2007 12:19:13 GMT
Author: antelder
Date: Sat Feb 24 04:19:09 2007
New Revision: 511265

URL: http://svn.apache.org/viewvc?view=rev&rev=511265
Log:
Add Ruby helloworld test

Added:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/helloworld/helloworld.rb
Modified:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/pom.xml
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/META-INF/sca/application.composite
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/pom.xml?view=diff&rev=511265&r1=511264&r2=511265
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/pom.xml Sat
Feb 24 04:19:09 2007
@@ -61,6 +61,13 @@
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.jruby</groupId>
+            <artifactId>jruby</artifactId>
+            <version>0.9.2</version>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
 
     <build>

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/META-INF/sca/application.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/META-INF/sca/application.composite?view=diff&rev=511265&r1=511264&r2=511265
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/META-INF/sca/application.composite
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/META-INF/sca/application.composite
Sat Feb 24 04:19:09 2007
@@ -25,4 +25,8 @@
         <implementation.script script="helloworld/helloworld.js"/>
     </component>
 
+    <component name="HelloWorldRubyComponent">
+        <implementation.script script="helloworld/helloworld.rb"/>
+    </component>
+
 </composite>

Added: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/helloworld/helloworld.rb
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/helloworld/helloworld.rb?view=auto&rev=511265
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/helloworld/helloworld.rb
(added)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/main/resources/helloworld/helloworld.rb
Sat Feb 24 04:19:09 2007
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "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.
+
+def getGreetings(s) 
+   return "rbHello " + s
+end
+

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java?view=diff&rev=511265&r1=511264&r2=511265
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
Sat Feb 24 04:19:09 2007
@@ -38,12 +38,18 @@
         this.compositeContext = CurrentCompositeContext.getContext();
     }
     
-    public void testWSClient() throws Exception {
+    public void testHelloWorldJavaScript() throws Exception {
         HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class,
"HelloWorldJSComponent");
         String msg = helloWorldService.getGreetings("Petra");
         Assert.assertEquals("jsHello Petra", msg);
     }
     
+    public void testHelloWorldRuby() throws Exception {
+        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class,
"HelloWorldRubyComponent");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("rbHello Petra", msg);
+    }
+
     @Override
     protected void tearDown() throws Exception {
     	super.tearDown();



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message