From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../script/itests/AbstractSCATestCase.java | 50 ++++++++++++++++++++++ .../helloworld/AbstractHelloWorldTestCase.java | 34 +++++++++++++++ .../helloworld/GroovyHelloWorldTestCase.java | 25 +++++++++++ .../script/itests/helloworld/HelloWorld.java | 26 +++++++++++ .../script/itests/helloworld/HelloWorldProxy.java | 33 ++++++++++++++ .../itests/helloworld/JRubyHelloWorldTestCase.java | 25 +++++++++++ .../helloworld/JavaScriptHelloWorldTestCase.java | 25 +++++++++++ .../helloworld/JythonHelloWorldTestCase.java | 25 +++++++++++ .../properties/AbstractHelloWorldTestCase.java | 34 +++++++++++++++ .../properties/GroovyHelloWorldTestCase.java | 25 +++++++++++ .../script/itests/properties/HelloWorld.java | 26 +++++++++++ .../script/itests/properties/HelloWorldProxy.java | 33 ++++++++++++++ .../properties/JRubyHelloWorldTestCaseFIXME.java | 29 +++++++++++++ .../properties/JavaScriptHelloWorldTestCase.java | 25 +++++++++++ .../properties/JythonHelloWorldTestCase.java | 25 +++++++++++ .../script/itests/references/HelloWorldTarget.java | 30 +++++++++++++ .../references/JavaScriptReferenceTestCase.java | 25 +++++++++++ 17 files changed, 495 insertions(+) create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/AbstractSCATestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/GroovyHelloWorldTestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/HelloWorld.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/HelloWorldProxy.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JRubyHelloWorldTestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JavaScriptHelloWorldTestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JythonHelloWorldTestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/AbstractHelloWorldTestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/GroovyHelloWorldTestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/HelloWorld.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/HelloWorldProxy.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JRubyHelloWorldTestCaseFIXME.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JavaScriptHelloWorldTestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JythonHelloWorldTestCase.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/references/HelloWorldTarget.java create mode 100644 sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/references/JavaScriptReferenceTestCase.java (limited to 'sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests') diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/AbstractSCATestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/AbstractSCATestCase.java new file mode 100644 index 0000000000..f320e4be4e --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/AbstractSCATestCase.java @@ -0,0 +1,50 @@ +/* + * 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.implementation.script.itests; + +import junit.framework.TestCase; + +import org.apache.tuscany.host.embedded.SCARuntime; +import org.osoa.sca.ComponentContext; +import org.osoa.sca.ServiceReference; + +public abstract class AbstractSCATestCase extends TestCase { + + protected T service; + + protected void setUp() throws Exception { + SCARuntime.start(getCompositeName()); + ComponentContext context = SCARuntime.getComponentContext("ClientComponent"); + ServiceReference serviceReference = context.createSelfReference(getServiceClass()); + service = serviceReference.getService(); + } + + abstract protected Class getServiceClass(); + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + + protected String getCompositeName() { + String className = this.getClass().getName(); + return className.substring(0, className.length() - 8).replace('.', '/') + ".composite"; + } + +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java new file mode 100644 index 0000000000..98adb1f830 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.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.implementation.script.itests.helloworld; + +import org.apache.tuscany.implementation.script.itests.AbstractSCATestCase; + +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/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/GroovyHelloWorldTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/GroovyHelloWorldTestCase.java new file mode 100644 index 0000000000..671bba61ca --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/GroovyHelloWorldTestCase.java @@ -0,0 +1,25 @@ +/* + * 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.implementation.script.itests.helloworld; + + +public class GroovyHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/HelloWorld.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/HelloWorld.java new file mode 100644 index 0000000000..510b20c21c --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/HelloWorld.java @@ -0,0 +1,26 @@ +/* + * 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.implementation.script.itests.helloworld; + +public interface HelloWorld { + + public String sayHello(String s); + +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/HelloWorldProxy.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/HelloWorldProxy.java new file mode 100644 index 0000000000..5ab737ec60 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/HelloWorldProxy.java @@ -0,0 +1,33 @@ +/* + * 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.implementation.script.itests.helloworld; + +import org.osoa.sca.annotations.Reference; + +public class HelloWorldProxy implements HelloWorld { + + @Reference + public HelloWorld delegate; + + public String sayHello(String s) { + return delegate.sayHello(s); + } + +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JRubyHelloWorldTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JRubyHelloWorldTestCase.java new file mode 100644 index 0000000000..566a62999e --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JRubyHelloWorldTestCase.java @@ -0,0 +1,25 @@ +/* + * 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.implementation.script.itests.helloworld; + + +public class JRubyHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JavaScriptHelloWorldTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JavaScriptHelloWorldTestCase.java new file mode 100644 index 0000000000..506421de18 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JavaScriptHelloWorldTestCase.java @@ -0,0 +1,25 @@ +/* + * 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.implementation.script.itests.helloworld; + + +public class JavaScriptHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JythonHelloWorldTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JythonHelloWorldTestCase.java new file mode 100644 index 0000000000..55296464f7 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/helloworld/JythonHelloWorldTestCase.java @@ -0,0 +1,25 @@ +/* + * 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.implementation.script.itests.helloworld; + + +public class JythonHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/AbstractHelloWorldTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/AbstractHelloWorldTestCase.java new file mode 100644 index 0000000000..2f249254d3 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/AbstractHelloWorldTestCase.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.implementation.script.itests.properties; + +import org.apache.tuscany.implementation.script.itests.AbstractSCATestCase; + +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/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/GroovyHelloWorldTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/GroovyHelloWorldTestCase.java new file mode 100644 index 0000000000..8a15074dbc --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/GroovyHelloWorldTestCase.java @@ -0,0 +1,25 @@ +/* + * 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.implementation.script.itests.properties; + + +public class GroovyHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/HelloWorld.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/HelloWorld.java new file mode 100644 index 0000000000..26033681f3 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/HelloWorld.java @@ -0,0 +1,26 @@ +/* + * 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.implementation.script.itests.properties; + +public interface HelloWorld { + + public String sayHello(String s); + +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/HelloWorldProxy.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/HelloWorldProxy.java new file mode 100644 index 0000000000..3d315b45ea --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/HelloWorldProxy.java @@ -0,0 +1,33 @@ +/* + * 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.implementation.script.itests.properties; + +import org.osoa.sca.annotations.Reference; + +public class HelloWorldProxy implements HelloWorld { + + @Reference + public HelloWorld delegate; + + public String sayHello(String s) { + return delegate.sayHello(s); + } + +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JRubyHelloWorldTestCaseFIXME.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JRubyHelloWorldTestCaseFIXME.java new file mode 100644 index 0000000000..6755501bca --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JRubyHelloWorldTestCaseFIXME.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.implementation.script.itests.properties; + +public class JRubyHelloWorldTestCaseFIXME extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name + + // this doesn't work as the property doesn't seem to get set in the JRuby + // script. It could be I've a typo somewhere, or a bug in the jruby script + // engine. + +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JavaScriptHelloWorldTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JavaScriptHelloWorldTestCase.java new file mode 100644 index 0000000000..c42f7e2151 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JavaScriptHelloWorldTestCase.java @@ -0,0 +1,25 @@ +/* + * 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.implementation.script.itests.properties; + + +public class JavaScriptHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JythonHelloWorldTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JythonHelloWorldTestCase.java new file mode 100644 index 0000000000..c1dd6ce4a7 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/properties/JythonHelloWorldTestCase.java @@ -0,0 +1,25 @@ +/* + * 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.implementation.script.itests.properties; + + +public class JythonHelloWorldTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/references/HelloWorldTarget.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/references/HelloWorldTarget.java new file mode 100644 index 0000000000..bc35df0670 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/references/HelloWorldTarget.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.implementation.script.itests.references; + +import org.apache.tuscany.implementation.script.itests.helloworld.HelloWorld; + +public class HelloWorldTarget implements HelloWorld { + + public String sayHello(String s) { + return "Hello " + s; + } + +} diff --git a/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/references/JavaScriptReferenceTestCase.java b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/references/JavaScriptReferenceTestCase.java new file mode 100644 index 0000000000..654e309350 --- /dev/null +++ b/sandbox/SPI/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/references/JavaScriptReferenceTestCase.java @@ -0,0 +1,25 @@ +/* + * 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.implementation.script.itests.references; + +import org.apache.tuscany.implementation.script.itests.helloworld.AbstractHelloWorldTestCase; + +public class JavaScriptReferenceTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} -- cgit v1.2.3