From e6c733c4d9d9116216c0a0105b770267918a12f9 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sun, 29 Aug 2010 18:32:20 +0000 Subject: Sandbox to experiment with different ways to embed the runtime. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@990620 13f79535-47bb-0310-9956-ffa450edef68 --- .../script/itests/AbstractSCATestCase.java | 59 ++++++++++++++++++++++ .../helloworld/AbstractHelloWorldTestCase.java | 38 ++++++++++++++ .../helloworld/GroovyHelloWorldTestCase.java | 29 +++++++++++ .../script/itests/helloworld/HelloWorld.java | 30 +++++++++++ .../script/itests/helloworld/HelloWorldProxy.java | 37 ++++++++++++++ .../itests/helloworld/JRubyHelloWorldTestCase.java | 29 +++++++++++ .../helloworld/JavaScriptHelloWorldTestCase.java | 29 +++++++++++ .../helloworld/JythonHelloWorldTestCase.java | 29 +++++++++++ .../properties/AbstractHelloWorldTestCase.java | 38 ++++++++++++++ .../properties/GroovyHelloWorldTestCase.java | 29 +++++++++++ .../script/itests/properties/HelloWorld.java | 30 +++++++++++ .../script/itests/properties/HelloWorldProxy.java | 37 ++++++++++++++ .../itests/properties/JRubyHelloWorldTestCase.java | 28 ++++++++++ .../properties/JavaScriptHelloWorldTestCase.java | 29 +++++++++++ .../properties/JythonHelloWorldTestCase.java | 29 +++++++++++ .../itests/references/GroovyReferenceTestCase.java | 29 +++++++++++ .../script/itests/references/HelloWorldTarget.java | 34 +++++++++++++ .../itests/references/JRubyReferenceTestCase.java | 29 +++++++++++ .../references/JavaScriptReferenceTestCase.java | 29 +++++++++++ .../itests/references/JythonReferenceTestCase.java | 29 +++++++++++ 20 files changed, 650 insertions(+) create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/AbstractSCATestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/GroovyHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/HelloWorld.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/HelloWorldProxy.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JRubyHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JavaScriptHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JythonHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/AbstractHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/GroovyHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/HelloWorld.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/HelloWorldProxy.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JRubyHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JavaScriptHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JythonHelloWorldTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/GroovyReferenceTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/HelloWorldTarget.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JRubyReferenceTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JavaScriptReferenceTestCase.java create mode 100644 sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JythonReferenceTestCase.java (limited to 'sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache') diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/AbstractSCATestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/AbstractSCATestCase.java new file mode 100644 index 0000000000..d9277c3ae1 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/AbstractSCATestCase.java @@ -0,0 +1,59 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.ContributionLocationHelper; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; + +/** + * + * @version $Rev$ $Date$ + */ +public abstract class AbstractSCATestCase extends TestCase { + + protected Node node; + protected T service; + + @Override + @SuppressWarnings("unchecked") + protected void setUp() throws Exception { + String contribution = ContributionLocationHelper.getContributionLocation(getClass()); + node = NodeFactory.getInstance().createNode(getCompositeName(), new Contribution("test", contribution)); + node.start(); + service = (T) node.getService(getServiceClass(), "ClientComponent"); + } + + protected abstract Class getServiceClass(); + + @Override + protected void tearDown() throws Exception { + node.stop(); + } + + protected String getCompositeName() { + String className = this.getClass().getName(); + return className.substring(0, className.length() - 8).replace('.', '/') + ".composite"; + } + +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java new file mode 100644 index 0000000000..1af3a295a4 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java @@ -0,0 +1,38 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.helloworld; + +import org.apache.tuscany.sca.implementation.script.itests.AbstractSCATestCase; + +/** + * + * @version $Rev$ $Date$ + */ +public abstract class AbstractHelloWorldTestCase extends AbstractSCATestCase { + + public void testCalculator() throws Exception { + assertEquals("Hello petra", service.sayHello("petra")); + } + + @Override + protected Class getServiceClass() { + return HelloWorld.class; + } +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/GroovyHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/GroovyHelloWorldTestCase.java new file mode 100644 index 0000000000..6a4f10dbbb --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/GroovyHelloWorldTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.helloworld; + + +/** + * + * @version $Rev$ $Date$ + */ +public class GroovyHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/HelloWorld.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/HelloWorld.java new file mode 100644 index 0000000000..f87cf104f3 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/HelloWorld.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.helloworld; + +/** + * + * @version $Rev$ $Date$ + */ +public interface HelloWorld { + + String sayHello(String s); + +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/HelloWorldProxy.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/HelloWorldProxy.java new file mode 100644 index 0000000000..cffe65c27a --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/HelloWorldProxy.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.helloworld; + +import org.oasisopen.sca.annotation.Reference; + +/** + * + * @version $Rev$ $Date$ + */ +public class HelloWorldProxy implements HelloWorld { + + @Reference + public HelloWorld delegate; + + public String sayHello(String s) { + return delegate.sayHello(s); + } + +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JRubyHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JRubyHelloWorldTestCase.java new file mode 100644 index 0000000000..ca4bd5ae6a --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JRubyHelloWorldTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.helloworld; + + +/** + * + * @version $Rev$ $Date$ + */ +public class JRubyHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JavaScriptHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JavaScriptHelloWorldTestCase.java new file mode 100644 index 0000000000..46ed9abce6 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JavaScriptHelloWorldTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.helloworld; + + +/** + * + * @version $Rev$ $Date$ + */ +public class JavaScriptHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JythonHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JythonHelloWorldTestCase.java new file mode 100644 index 0000000000..d694515829 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/JythonHelloWorldTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.helloworld; + + +/** + * + * @version $Rev$ $Date$ + */ +public class JythonHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/AbstractHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/AbstractHelloWorldTestCase.java new file mode 100644 index 0000000000..e7375253a3 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/AbstractHelloWorldTestCase.java @@ -0,0 +1,38 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.properties; + +import org.apache.tuscany.sca.implementation.script.itests.AbstractSCATestCase; + +/** + * + * @version $Rev$ $Date$ + */ +public abstract class AbstractHelloWorldTestCase extends AbstractSCATestCase { + + public void testCalculator() throws Exception { + // assertEquals("Hello petra from Tuscany", service.sayHello("petra")); + } + + @Override + protected Class getServiceClass() { + return HelloWorld.class; + } +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/GroovyHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/GroovyHelloWorldTestCase.java new file mode 100644 index 0000000000..f93edc76d1 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/GroovyHelloWorldTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.properties; + + +/** + * + * @version $Rev$ $Date$ + */ +public class GroovyHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/HelloWorld.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/HelloWorld.java new file mode 100644 index 0000000000..910d22ec83 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/HelloWorld.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.properties; + +/** + * + * @version $Rev$ $Date$ + */ +public interface HelloWorld { + + String sayHello(String s); + +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/HelloWorldProxy.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/HelloWorldProxy.java new file mode 100644 index 0000000000..719212e831 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/HelloWorldProxy.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.properties; + +import org.oasisopen.sca.annotation.Reference; + +/** + * + * @version $Rev$ $Date$ + */ +public class HelloWorldProxy implements HelloWorld { + + @Reference + public HelloWorld delegate; + + public String sayHello(String s) { + return delegate.sayHello(s); + } + +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JRubyHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JRubyHelloWorldTestCase.java new file mode 100644 index 0000000000..60c73359c0 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JRubyHelloWorldTestCase.java @@ -0,0 +1,28 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.properties; + +/** + * + * @version $Rev$ $Date$ + */ +public class JRubyHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JavaScriptHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JavaScriptHelloWorldTestCase.java new file mode 100644 index 0000000000..cde96b4b9b --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JavaScriptHelloWorldTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.properties; + + +/** + * + * @version $Rev$ $Date$ + */ +public class JavaScriptHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JythonHelloWorldTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JythonHelloWorldTestCase.java new file mode 100644 index 0000000000..0e6be74e09 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/properties/JythonHelloWorldTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.properties; + + +/** + * + * @version $Rev$ $Date$ + */ +public class JythonHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/GroovyReferenceTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/GroovyReferenceTestCase.java new file mode 100644 index 0000000000..6116581356 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/GroovyReferenceTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.references; + +import org.apache.tuscany.sca.implementation.script.itests.helloworld.AbstractHelloWorldTestCase; + +/** + * + * @version $Rev$ $Date$ + */ +public class GroovyReferenceTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/HelloWorldTarget.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/HelloWorldTarget.java new file mode 100644 index 0000000000..dfcd37c46c --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/HelloWorldTarget.java @@ -0,0 +1,34 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.references; + +import org.apache.tuscany.sca.implementation.script.itests.helloworld.HelloWorld; + +/** + * + * @version $Rev$ $Date$ + */ +public class HelloWorldTarget implements HelloWorld { + + public String sayHello(String s) { + return "Hello " + s; + } + +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JRubyReferenceTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JRubyReferenceTestCase.java new file mode 100644 index 0000000000..83c2e99469 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JRubyReferenceTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.references; + +import org.apache.tuscany.sca.implementation.script.itests.helloworld.AbstractHelloWorldTestCase; + +/** + * + * @version $Rev$ $Date$ + */ +public class JRubyReferenceTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JavaScriptReferenceTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JavaScriptReferenceTestCase.java new file mode 100644 index 0000000000..392e16411c --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JavaScriptReferenceTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.references; + +import org.apache.tuscany.sca.implementation.script.itests.helloworld.AbstractHelloWorldTestCase; + +/** + * + * @version $Rev$ $Date$ + */ +public class JavaScriptReferenceTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JythonReferenceTestCase.java b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JythonReferenceTestCase.java new file mode 100644 index 0000000000..8866ae6b70 --- /dev/null +++ b/sandbox/sebastien/java/embed/modules/implementation-script-runtime/src/test/java/org/apache/tuscany/sca/implementation/script/itests/references/JythonReferenceTestCase.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.tuscany.sca.implementation.script.itests.references; + +import org.apache.tuscany.sca.implementation.script.itests.helloworld.AbstractHelloWorldTestCase; + +/** + * + * @version $Rev$ $Date$ + */ +public class JythonReferenceTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} -- cgit v1.2.3