summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-integration/sca/extensions/script/itests/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-integration/sca/extensions/script/itests/src/test')
-rw-r--r--branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java59
-rw-r--r--branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java72
-rw-r--r--branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java75
-rw-r--r--branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java74
-rw-r--r--branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java68
-rw-r--r--branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java73
-rw-r--r--branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java61
7 files changed, 0 insertions, 482 deletions
diff --git a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java b/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java
deleted file mode 100644
index a98e3f000b..0000000000
--- a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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 calculator;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.tuscany.api.SCARuntime;
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
-
-/**
- * Test case for caluclator service
- */
-public class CalculatorClientTestCase extends TestCase {
-
- private CompositeContext compositeContext;
-
- public void testCalculatorRuby() throws Exception {
- CalculatorService calculatorService = compositeContext.locateService(CalculatorService.class, "RubyCalculatorComponent");
- Assert.assertEquals(3.0, calculatorService.add(1,2));
- Assert.assertEquals(1.5, calculatorService.div(3,2));
- }
-
- public void testCalculatorPython() throws Exception {
- CalculatorService calculatorService = compositeContext.locateService(CalculatorService.class, "PythonCalculatorComponent");
- Assert.assertEquals(3.0, calculatorService.add(1,2));
- Assert.assertEquals(1.5, calculatorService.div(3,2));
- }
-
- @Override
- protected void setUp() throws Exception {
- SCARuntime.start("calculator/sample.calculator.composite");
- this.compositeContext = CurrentCompositeContext.getContext();
- }
-
- @Override
- protected void tearDown() throws Exception {
- SCARuntime.stop();
- }
-
-}
diff --git a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java b/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
deleted file mode 100644
index e1c382a6bc..0000000000
--- a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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 junit.framework.TestCase;
-
-import org.apache.tuscany.api.SCARuntime;
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
-
-/**
- * Test case for helloworld web service client
- */
-public class HelloWorldClientTestCase extends TestCase {
-
- private CompositeContext compositeContext;
-
- 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);
- }
-
- public void testHelloWorldPython() throws Exception {
- HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldPythonComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("pyHello Petra", msg);
- }
-
-// TODO: Groovy doesn't work yet. Looks like a bug in the Groovy BSF engine
-// public void testHelloWorldGroovy() throws Exception {
-// HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldGroovyComponent");
-// String msg = helloWorldService.getGreetings("Petra");
-// Assert.assertEquals("groovyHello Petra", msg);
-// }
-
- @Override
- protected void setUp() throws Exception {
- SCARuntime.start("META-INF/sca/helloworld.composite");
- this.compositeContext = CurrentCompositeContext.getContext();
- }
-
- @Override
- protected void tearDown() throws Exception {
- SCARuntime.stop();
- }
-
-}
diff --git a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java b/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java
deleted file mode 100644
index b87e96d365..0000000000
--- a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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 junit.framework.TestCase;
-
-import org.apache.tuscany.api.SCARuntime;
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
-
-/**
- * Test case for using references in script components
- */
-public class JavaScriptPropertiesTestCase extends TestCase {
-
- 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 {
- SCARuntime.start("META-INF/sca/properties.composite");
- this.compositeContext = CurrentCompositeContext.getContext();
- }
-
- @Override
- protected void tearDown() throws Exception {
- SCARuntime.stop();
- }
-
-}
diff --git a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java b/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java
deleted file mode 100644
index c26fddff70..0000000000
--- a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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 junit.framework.TestCase;
-
-import org.apache.tuscany.api.SCARuntime;
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
-
-/**
- * Test case for using references in script components
- */
-public class PythonPropertiesTestCase extends TestCase {
-
- private CompositeContext compositeContext;
-
- public void testPythonDefault() throws Exception {
- HelloWorldService helloWorldService =
- compositeContext.locateService(HelloWorldService.class, "HelloWorldPythonDefaultComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("pyKia Ora Petra", msg);
- }
- public void testPythonOverride() throws Exception {
- HelloWorldService helloWorldService =
- compositeContext.locateService(HelloWorldService.class, "HelloWorldPythonOverrideComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("pyNamaskaar Petra", msg);
- }
-
- public void testPythonDynDefault() throws Exception {
- HelloWorldService helloWorldService =
- compositeContext.locateService(HelloWorldService.class, "HelloWorldPythonDynDefaultComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("pyYo! Petra", msg);
- }
-
- public void testPythonDynOverride() throws Exception {
- HelloWorldService helloWorldService =
- compositeContext.locateService(HelloWorldService.class, "HelloWorldPythonDynOverrideComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("pyNamaste Petra", msg);
- }
-
- @Override
- protected void setUp() throws Exception {
- SCARuntime.start("META-INF/sca/properties.composite");
- this.compositeContext = CurrentCompositeContext.getContext();
- }
-
- @Override
- protected void tearDown() throws Exception {
- SCARuntime.stop();
- }
-
-}
diff --git a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java b/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java
deleted file mode 100644
index 04a7bf0de3..0000000000
--- a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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 junit.framework.TestCase;
-
-import org.apache.tuscany.api.SCARuntime;
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
-
-/**
- * Test case for using references in script components
- */
-public class ReferencesTestCase extends TestCase {
-
- private CompositeContext compositeContext;
-
- public void testHelloWorldJavaScript() throws Exception {
- HelloWorldService helloWorldService =
- compositeContext.locateService(HelloWorldService.class, "HelloWorldJSProxyComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("jsproxyjsHello Petra", msg);
- }
-
- public void testHelloWorldPython() throws Exception {
- HelloWorldService helloWorldService =
- compositeContext.locateService(HelloWorldService.class, "HelloWorldPythonProxyComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("pyproxyjsHello Petra", msg);
- }
-
- public void testHelloWorldRuby() throws Exception {
- HelloWorldService helloWorldService =
- compositeContext.locateService(HelloWorldService.class, "HelloWorldRubyProxyComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("rbproxyjsHello Petra", msg);
- }
-
- @Override
- protected void setUp() throws Exception {
- SCARuntime.start("META-INF/sca/references.composite");
- this.compositeContext = CurrentCompositeContext.getContext();
- }
-
- @Override
- protected void tearDown() throws Exception {
- SCARuntime.stop();
- }
-
-}
diff --git a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java b/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java
deleted file mode 100644
index 262141f680..0000000000
--- a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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 junit.framework.TestCase;
-
-import org.apache.tuscany.api.SCARuntime;
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
-
-/**
- * Test case for using references in script components
- */
-public class RubyPropertiesTestCase extends TestCase {
-
- 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 {
- SCARuntime.start("META-INF/sca/properties.composite");
- this.compositeContext = CurrentCompositeContext.getContext();
- }
-
- @Override
- protected void tearDown() throws Exception {
- SCARuntime.stop();
- }
-
-}
diff --git a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java b/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java
deleted file mode 100644
index 4099559a2a..0000000000
--- a/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 junit.framework.TestCase;
-
-import org.apache.tuscany.api.SCARuntime;
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
-
-/**
- * Test case for using XML in script components
- */
-public class XMLTestCase extends TestCase {
-
- private CompositeContext compositeContext;
-
- public void testHelloWorldJavaScript() throws Exception {
- HelloWorldService helloWorldService =
- compositeContext.locateService(HelloWorldService.class, "HelloWorldJSComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("e4xHi Petra", msg);
- }
-
- public void testHelloWorldJavaScript2() throws Exception {
- HelloWorldService helloWorldService =
- compositeContext.locateService(HelloWorldService.class, "HelloWorldJSViaProxyComponent");
- String msg = helloWorldService.getGreetings("Petra");
- Assert.assertEquals("e4xHi Petra", msg);
- }
-
- @Override
- protected void setUp() throws Exception {
- SCARuntime.start("META-INF/sca/xml.composite");
- this.compositeContext = CurrentCompositeContext.getContext();
- }
-
- @Override
- protected void tearDown() throws Exception {
- SCARuntime.stop();
- }
-
-}