You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2007/03/04 14:40:53 UTC

svn commit: r514399 - in /incubator/tuscany/branches/sca-java-integration/sca/extensions: ./ script/ script/itests/src/test/java/calculator/ script/itests/src/test/java/helloworld/

Author: antelder
Date: Sun Mar  4 05:40:52 2007
New Revision: 514399

URL: http://svn.apache.org/viewvc?view=rev&rev=514399
Log:
Fix script testcases to work with latest test environment, split property tests into seperate testcases to work around running out of storage bug, add script into default profile so it doesn't get broken

Added:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java   (with props)
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java
      - copied, changed from r514137, incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PropertiesTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java   (with props)
Removed:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PropertiesTestCase.java
Modified:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/pom.xml
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/script/pom.xml

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/pom.xml?view=diff&rev=514399&r1=514398&r2=514399
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/pom.xml Sun Mar  4 05:40:52 2007
@@ -75,6 +75,7 @@
             </activation>
             <modules>
                 <module>axis2</module>
+                <module>script</module>
             </modules>
         </profile>
 

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java?view=diff&rev=514399&r1=514398&r2=514399
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java Sun Mar  4 05:40:52 2007
@@ -46,7 +46,7 @@
 
     @Override
     protected void setUp() throws Exception {
-        setApplicationSCDL(getClass().getResource("/calculator/sample.calculator.composite"));
+        setApplicationSCDL("calculator/sample.calculator.composite");
         super.setUp();
         this.compositeContext = CurrentCompositeContext.getContext();
     }

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=514399&r1=514398&r2=514399
==============================================================================
--- 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 Sun Mar  4 05:40:52 2007
@@ -59,7 +59,7 @@
 
     @Override
     protected void setUp() throws Exception {
-        setApplicationSCDL(getClass().getResource("/META-INF/sca/helloworld.composite"));
+        setApplicationSCDL("META-INF/sca/helloworld.composite");
         super.setUp();
         this.compositeContext = CurrentCompositeContext.getContext();
     }

Added: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java?view=auto&rev=514399
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java Sun Mar  4 05:40:52 2007
@@ -0,0 +1,77 @@
+/*
+ * 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.    
+ */
+
+package helloworld;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.test.SCATestCase;
+import org.mozilla.javascript.Context;
+import org.mozilla.javascript.ContextFactory;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+/**
+ * Test case for using references in script components
+ */
+public class JavaScriptPropertiesTestCase extends SCATestCase {
+
+     private CompositeContext compositeContext;
+
+    public void testJavaScriptDefault() throws Exception {
+        HelloWorldService helloWorldService =
+            compositeContext.locateService(HelloWorldService.class, "HelloWorldJSDefaultComponent");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("jsKia Ora Petra", msg);
+    }
+
+    public void testJavaScriptOverride() throws Exception {
+        HelloWorldService helloWorldService =
+            compositeContext.locateService(HelloWorldService.class, "HelloWorldJSOverrideComponent");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("jsNamaskaar Petra", msg);
+    }
+
+    public void testJavaScriptDynDefault() throws Exception {
+        HelloWorldService helloWorldService =
+            compositeContext.locateService(HelloWorldService.class, "HelloWorldJSDynDefaultComponent");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("jsYo! Petra", msg);
+    }
+
+    public void testJavaScriptDynOverride() throws Exception {
+        HelloWorldService helloWorldService =
+            compositeContext.locateService(HelloWorldService.class, "HelloWorldJSDynOverrideComponent");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("jsNamaste Petra", msg);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        setApplicationSCDL("META-INF/sca/properties.composite");
+        super.setUp();
+        this.compositeContext = CurrentCompositeContext.getContext();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+}

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java (from r514137, incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PropertiesTestCase.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java?view=diff&rev=514399&p1=incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PropertiesTestCase.java&r1=514137&p2=incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java&r2=514399
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PropertiesTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java Sun Mar  4 05:40:52 2007
@@ -30,38 +30,10 @@
 /**
  * Test case for using references in script components
  */
-public class PropertiesTestCase extends SCATestCase {
+public class PythonPropertiesTestCase extends SCATestCase {
 
      private CompositeContext compositeContext;
 
-    public void testJavaScriptDefault() throws Exception {
-        HelloWorldService helloWorldService =
-            compositeContext.locateService(HelloWorldService.class, "HelloWorldJSDefaultComponent");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("jsKia Ora Petra", msg);
-    }
-
-    public void testJavaScriptOverride() throws Exception {
-        HelloWorldService helloWorldService =
-            compositeContext.locateService(HelloWorldService.class, "HelloWorldJSOverrideComponent");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("jsNamaskaar Petra", msg);
-    }
-
-    public void testJavaScriptDynDefault() throws Exception {
-        HelloWorldService helloWorldService =
-            compositeContext.locateService(HelloWorldService.class, "HelloWorldJSDynDefaultComponent");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("jsYo! Petra", msg);
-    }
-
-    public void testJavaScriptDynOverride() throws Exception {
-        HelloWorldService helloWorldService =
-            compositeContext.locateService(HelloWorldService.class, "HelloWorldJSDynOverrideComponent");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("jsNamaste Petra", msg);
-    }
-
     public void testPythonDefault() throws Exception {
         HelloWorldService helloWorldService =
             compositeContext.locateService(HelloWorldService.class, "HelloWorldPythonDefaultComponent");
@@ -89,35 +61,9 @@
         Assert.assertEquals("pyNamaste Petra", msg);
     }
 
-    public void testRubyDefault() throws Exception {
-        HelloWorldService helloWorldService =
-            compositeContext.locateService(HelloWorldService.class, "HelloWorldRubyDefaultComponent");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("rbKia Ora Petra", msg);
-    }
-    public void testRubyOverride() throws Exception {
-        HelloWorldService helloWorldService =
-            compositeContext.locateService(HelloWorldService.class, "HelloWorldRubyOverrideComponent");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("rbNamaskaar Petra", msg);
-    }
-
-    public void testRubyDynDefault() throws Exception {
-        HelloWorldService helloWorldService =
-            compositeContext.locateService(HelloWorldService.class, "HelloWorldRubyDynDefaultComponent");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("rbYo! Petra", msg);
-    }
-    public void testRubyDynOverride() throws Exception {
-        HelloWorldService helloWorldService =
-            compositeContext.locateService(HelloWorldService.class, "HelloWorldRubyDynOverrideComponent");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("rbNamaste Petra", msg);
-    }
-
     @Override
     protected void setUp() throws Exception {
-        setApplicationSCDL(getClass().getResource("/META-INF/sca/properties.composite"));
+        setApplicationSCDL("META-INF/sca/properties.composite");
         super.setUp();
         this.compositeContext = CurrentCompositeContext.getContext();
     }

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java?view=diff&rev=514399&r1=514398&r2=514399
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java Sun Mar  4 05:40:52 2007
@@ -55,7 +55,7 @@
 
     @Override
     protected void setUp() throws Exception {
-        setApplicationSCDL(getClass().getResource("/META-INF/sca/references.composite"));
+        setApplicationSCDL("META-INF/sca/references.composite");
         super.setUp();
         this.compositeContext = CurrentCompositeContext.getContext();
     }

Added: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java?view=auto&rev=514399
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java Sun Mar  4 05:40:52 2007
@@ -0,0 +1,75 @@
+/*
+ * 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.    
+ */
+
+package helloworld;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.test.SCATestCase;
+import org.mozilla.javascript.Context;
+import org.mozilla.javascript.ContextFactory;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+/**
+ * Test case for using references in script components
+ */
+public class RubyPropertiesTestCase extends SCATestCase {
+
+     private CompositeContext compositeContext;
+
+    public void testRubyDefault() throws Exception {
+        HelloWorldService helloWorldService =
+            compositeContext.locateService(HelloWorldService.class, "HelloWorldRubyDefaultComponent");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("rbKia Ora Petra", msg);
+    }
+    public void testRubyOverride() throws Exception {
+        HelloWorldService helloWorldService =
+            compositeContext.locateService(HelloWorldService.class, "HelloWorldRubyOverrideComponent");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("rbNamaskaar Petra", msg);
+    }
+
+    public void testRubyDynDefault() throws Exception {
+        HelloWorldService helloWorldService =
+            compositeContext.locateService(HelloWorldService.class, "HelloWorldRubyDynDefaultComponent");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("rbYo! Petra", msg);
+    }
+    public void testRubyDynOverride() throws Exception {
+        HelloWorldService helloWorldService =
+            compositeContext.locateService(HelloWorldService.class, "HelloWorldRubyDynOverrideComponent");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("rbNamaste Petra", msg);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        setApplicationSCDL("META-INF/sca/properties.composite");
+        super.setUp();
+        this.compositeContext = CurrentCompositeContext.getContext();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+}

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java?view=diff&rev=514399&r1=514398&r2=514399
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java Sun Mar  4 05:40:52 2007
@@ -48,7 +48,7 @@
 
     @Override
     protected void setUp() throws Exception {
-        setApplicationSCDL(getClass().getResource("/META-INF/sca/xml.composite"));
+        setApplicationSCDL("META-INF/sca/xml.composite");
         super.setUp();
         this.compositeContext = CurrentCompositeContext.getContext();
     }

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/pom.xml?view=diff&rev=514399&r1=514398&r2=514399
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/pom.xml Sun Mar  4 05:40:52 2007
@@ -26,7 +26,7 @@
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
+    <groupId>org.apache.tuscany.sca.extensions.script</groupId>
     <artifactId>parent</artifactId>
     <packaging>pom</packaging>
     <name>Apache Tuscany SCA Extensions for Scripting</name>



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