From 0daa6e66908eb59332ee38b5bd2193ba40a7eb55 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 23 Mar 2009 08:34:33 +0000 Subject: Delete test trunk in sandbox git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@757347 13f79535-47bb-0310-9956-ffa450edef68 --- .../itest/interfaces/LocalCallbackInterface.java | 30 ----- .../sca/itest/interfaces/LocalClientComponent.java | 47 -------- .../itest/interfaces/LocalClientComponentImpl.java | 83 ------------- .../itest/interfaces/LocalServiceComponent.java | 37 ------ .../interfaces/LocalServiceComponentImpl.java | 49 -------- .../sca/itest/interfaces/ParameterObject.java | 48 -------- .../itest/interfaces/RemoteCallbackInterface.java | 33 ------ .../itest/interfaces/RemoteClientComponent.java | 64 ---------- .../interfaces/RemoteClientComponentImpl.java | 81 ------------- .../itest/interfaces/RemoteServiceComponent.java | 38 ------ .../interfaces/RemoteServiceComponentImpl.java | 54 --------- .../src/main/resources/InterfacesTest.composite | 40 ------- .../sca/itest/interfaces/InterfacesTestCase.java | 131 --------------------- 13 files changed, 735 deletions(-) delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/main/resources/InterfacesTest.composite delete mode 100644 sandbox/ant/sca/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java (limited to 'sandbox/ant/sca/trunk/itest/interfaces/src') diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java deleted file mode 100644 index f4131593d5..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java +++ /dev/null @@ -1,30 +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 org.apache.tuscany.sca.itest.interfaces; - -/** - * only for callBack - */ -public interface LocalCallbackInterface { - - void callbackMethod(String str); - - void modifyParameter(ParameterObject po); - -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java deleted file mode 100644 index 5fc9ed51b3..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java +++ /dev/null @@ -1,47 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.OneWay; - -/* - * itest for interface: local,method-overloading - */ -public interface LocalClientComponent { - - String foo1(ParameterObject po); - - String foo1(String str) throws Exception; - - String foo2(String str, int i); - - String foo2(int i, String str) throws Exception; - - void callback(String str); - - void callModifyParameter(); - - @OneWay - void onewayMethod(String str); - - String getCallbackValue(); - - String getOnewayValue(); -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java deleted file mode 100644 index 6cd937af12..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java +++ /dev/null @@ -1,83 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(LocalClientComponent.class) -public class LocalClientComponentImpl implements LocalClientComponent, LocalCallbackInterface { - - @Reference - protected LocalServiceComponent aCallBackService; - private static String callbackValue; - private static String onewayValue; - - public String foo1(ParameterObject po) { - po.field1 = "AComponent"; - return "AComponent"; - } - - public String foo1(String str) throws Exception { - return str + "AComponent"; - } - - public String foo2(String str, int i) { - return str + "AComponent" + i; - } - - public String foo2(int i, String str) throws Exception { - return str + "AComponent" + i; - } - - public void callback(String str) { - aCallBackService.callback(str); - } - - public void callbackMethod(String str) { - callbackValue = str; - } - - public void callModifyParameter() { - this.aCallBackService.modifyParameter(); - } - - public String getCallbackValue() { - return callbackValue; - } - - public void onewayMethod(String str) { - onewayValue = str; - try { - Thread.sleep(200); - } catch (Exception e) { - //do nothing - } - } - - public String getOnewayValue() { - return onewayValue; - } - - public void modifyParameter(ParameterObject po) { - po.field1 = "AComponent"; - } - -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java deleted file mode 100644 index 05a9d09bdd..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java +++ /dev/null @@ -1,37 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Callback; - -/** - * Local be-directional callBackService - */ -@Callback(LocalCallbackInterface.class) -public interface LocalServiceComponent { - - String foo(String str); - - void callback(String str); - - void modifyParameter(); - - ParameterObject getPO(); - -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java deleted file mode 100644 index ab0b18191c..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java +++ /dev/null @@ -1,49 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(LocalServiceComponent.class) -public class LocalServiceComponentImpl implements LocalServiceComponent { - - @Callback - protected LocalCallbackInterface callback; - - private static ParameterObject po; - - public void callback(String str) { - callback.callbackMethod(str); - } - - public void modifyParameter() { - po = new ParameterObject("CallBack"); - callback.modifyParameter(po); - } - - public String foo(String str) { - return str; - } - - public ParameterObject getPO() { - return po; - } - -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java deleted file mode 100644 index 724d94dffb..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java +++ /dev/null @@ -1,48 +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 org.apache.tuscany.sca.itest.interfaces; - -import java.io.Serializable; - -public class ParameterObject implements Serializable { - private static final long serialVersionUID = 1L; - public String field1; - - public ParameterObject() { - this.field1 = null; - } - - public ParameterObject(String field1) { - this.field1 = field1; - } - - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ParameterObject) { - ParameterObject other = (ParameterObject)o; - if (field1 != null) { - return field1.equals(other.field1); - } - } - return false; - } -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java deleted file mode 100644 index be3fa4c15a..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java +++ /dev/null @@ -1,33 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * only for callBack - */ -@Remotable -public interface RemoteCallbackInterface { - - void callbackMethod(String str); - - void modifyParameter(ParameterObject po); -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java deleted file mode 100644 index 9f34dfd274..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java +++ /dev/null @@ -1,64 +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. - */ -/* - * 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.itest.interfaces; - -import org.oasisopen.sca.annotation.Remotable; - -/* - * different signatures - */ - -@Remotable -public interface RemoteClientComponent { - - String foo1(ParameterObject po); - - String foo3(ParameterObject po); - - String foo2(int i, String str1) throws Exception; - - void callback(String str); - - void callModifyParameter(); - - String getCallbackValue(); - - void onewayMethod(String str); - - String getOnewayValue(); -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java deleted file mode 100644 index 541b1f1508..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java +++ /dev/null @@ -1,81 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.AllowsPassByReference; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(RemoteClientComponent.class) -public class RemoteClientComponentImpl implements RemoteClientComponent, RemoteCallbackInterface { - - @Reference - protected RemoteServiceComponent aCallBackService; - private static String callbackValue; - private static String onewayValue; - - public String foo1(ParameterObject po) { - po.field1 = "BComponent"; - return "BComponent"; - } - - @AllowsPassByReference - public String foo3(ParameterObject po) { - po.field1 = "BComponent"; - return "BComponent"; - } - - public String foo2(int i, String str) throws Exception { - return str + "BComponent" + i; - } - - public void callback(String str) { - aCallBackService.callback(str); - } - - public void callModifyParameter() { - this.aCallBackService.modifyParameter(); - } - - public void callbackMethod(String str) { - callbackValue = str; - } - - public String getCallbackValue() { - return callbackValue; - } - - public void onewayMethod(String str) { - onewayValue = str; - try { - Thread.sleep(200); - } catch (Exception e) { - //do nothing - } - } - - public String getOnewayValue() { - return onewayValue; - } - - public void modifyParameter(ParameterObject po) { - po.field1 = "BComponent"; - } -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java deleted file mode 100644 index b29b298ab6..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java +++ /dev/null @@ -1,38 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(RemoteCallbackInterface.class) -public interface RemoteServiceComponent { - - String foo(String str); - - void callback(String str); - - void modifyParameter(); - - ParameterObject getPO(); - - String[] bar(int[][] intArray); -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java b/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java deleted file mode 100644 index 00a0f5645b..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java +++ /dev/null @@ -1,54 +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 org.apache.tuscany.sca.itest.interfaces; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(RemoteServiceComponent.class) -public class RemoteServiceComponentImpl implements RemoteServiceComponent { - - @Callback - protected RemoteCallbackInterface callback; - - private static ParameterObject po; - - public void callback(String str) { - callback.callbackMethod(str); - } - - public void modifyParameter() { - po = new ParameterObject("CallBack"); - callback.modifyParameter(po); - } - - public String foo(String str) { - return str; - } - - public ParameterObject getPO() { - return po; - } - - public String[] bar(int[][] intArray) { - return new String[] {"int"}; - } - -} diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/main/resources/InterfacesTest.composite b/sandbox/ant/sca/trunk/itest/interfaces/src/main/resources/InterfacesTest.composite deleted file mode 100644 index 8b3d0e8f63..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/main/resources/InterfacesTest.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/ant/sca/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java b/sandbox/ant/sca/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java deleted file mode 100644 index 57ba18d0d6..0000000000 --- a/sandbox/ant/sca/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java +++ /dev/null @@ -1,131 +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 org.apache.tuscany.sca.itest.interfaces; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -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; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class InterfacesTestCase { - private static Node node; - - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("InterfacesTest.composite"); - node = NodeFactory.newInstance().createNode("InterfacesTest.composite", new Contribution("c1", location)); - node.start(); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testLocalClient() { - LocalServiceComponent service = node.getService(LocalServiceComponent.class, "LocalServiceComponent"); - LocalClientComponent local = node.getService(LocalClientComponent.class, "LocalClientComponent"); - - try { - ParameterObject po = new ParameterObject(); - assertEquals("AComponent", local.foo1(po)); - assertEquals("AComponent", po.field1); - - assertEquals("AAComponent", local.foo1("A")); - - assertEquals("AAComponent1", local.foo2("A", 1)); - assertEquals("AAComponent1", local.foo2(1, "A")); - } catch (Exception e) { - fail(); - } - - try { - // test local callback - local.callback("CallBack"); - Thread.sleep(100); - assertEquals("CallBack", local.getCallbackValue()); - - local.callModifyParameter(); - Thread.sleep(100); - assertEquals("AComponent", service.getPO().field1); - } catch (Exception e) { - e.printStackTrace(); - fail("CallBack failed"); - } - - try { - local.onewayMethod("OneWay"); - Thread.sleep(100); - assertEquals("OneWay", local.getOnewayValue()); - } catch (Exception e) { - fail("OneWay failed"); - } - } - - @Test - public void testRemoteClient() { - RemoteServiceComponent service = node.getService(RemoteServiceComponent.class, "RemoteServiceComponent"); - RemoteClientComponent remote = node.getService(RemoteClientComponent.class, "RemoteClientComponent"); - - try { - // Test Pass By Value - ParameterObject po = new ParameterObject("NotBComponent"); - assertEquals("BComponent", remote.foo1(po)); - assertEquals("NotBComponent", po.field1); - - assertEquals("BBComponent1", remote.foo2(1, "B")); - - // Test allowsPassByReference - assertEquals("BComponent", remote.foo3(po)); - assertEquals("BComponent", po.field1); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - - try { - remote.callback("CallBack"); - Thread.sleep(100); - assertEquals("CallBack", remote.getCallbackValue()); - - remote.callModifyParameter(); - Thread.sleep(100); - assertEquals("CallBack", service.getPO().field1); - } catch (Exception e) { - fail("CallBack failed"); - } - - try { - remote.onewayMethod("OneWay"); - Thread.sleep(100); - assertEquals("OneWay", remote.getOnewayValue()); - } catch (Exception e) { - fail("OneWay failed"); - } - } - -} -- cgit v1.2.3