From 9f395ebf3ec27f89c8dc63137bc99c8d6b0cff6d Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:07:37 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835125 13f79535-47bb-0310-9956-ffa450edef68 --- .../itest/recursive/src/test/java/sample/C.java | 32 -------- .../recursive/src/test/java/sample/CImpl.java | 80 ------------------ .../src/test/java/sample/NestedTestCase.java | 96 ---------------------- .../sample/RecursiveCompositeTestCaseFIXME.java | 53 ------------ .../itest/recursive/src/test/java/sample/X.java | 32 -------- .../recursive/src/test/java/sample/XImpl.java | 37 --------- .../itest/recursive/src/test/java/sample/Y.java | 32 -------- .../recursive/src/test/java/sample/YImpl.java | 38 --------- 8 files changed, 400 deletions(-) delete mode 100644 branches/sca-java-1.2/itest/recursive/src/test/java/sample/C.java delete mode 100644 branches/sca-java-1.2/itest/recursive/src/test/java/sample/CImpl.java delete mode 100644 branches/sca-java-1.2/itest/recursive/src/test/java/sample/NestedTestCase.java delete mode 100644 branches/sca-java-1.2/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java delete mode 100644 branches/sca-java-1.2/itest/recursive/src/test/java/sample/X.java delete mode 100644 branches/sca-java-1.2/itest/recursive/src/test/java/sample/XImpl.java delete mode 100644 branches/sca-java-1.2/itest/recursive/src/test/java/sample/Y.java delete mode 100644 branches/sca-java-1.2/itest/recursive/src/test/java/sample/YImpl.java (limited to 'branches/sca-java-1.2/itest/recursive/src/test/java/sample') diff --git a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/C.java b/branches/sca-java-1.2/itest/recursive/src/test/java/sample/C.java deleted file mode 100644 index bf8391348b..0000000000 --- a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/C.java +++ /dev/null @@ -1,32 +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 sample; - -/** - * Simple Service - */ -public interface C { - - /** - * Sample operation - * - * @return A String - */ - String cOp(); -} diff --git a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/CImpl.java b/branches/sca-java-1.2/itest/recursive/src/test/java/sample/CImpl.java deleted file mode 100644 index 466284983e..0000000000 --- a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/CImpl.java +++ /dev/null @@ -1,80 +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 sample; - -import junit.framework.Assert; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * Implementation of a simple service - */ -@Service(C.class) -public class CImpl implements C { - - /** - * Reference to X - */ - private X xRef; - - /** - * Reference to Y - */ - private Y yRef; - - /** - * Setter for refX - * - * @param x Reference to X - */ - @Reference(name="refX") - protected void setX(X x) - { - System.out.println("Setting X on CImpl to " + x); - xRef = x; - } - - /** - * Setter for refY - * - * @param y Reference to Y - */ - @Reference(name="refY") - protected void setY(Y y) - { - System.out.println("Setting Y on CImpl to " + y); - yRef = y; - } - - /** - * Simple operation that uses the injected references to X and Y - * - * @return "C:cOp() - xResult = " + xRef.xOP() + " yResult = " + yRef.yOp(); - */ - public String cOp() { - Assert.assertNotNull(xRef); - Assert.assertNotNull(yRef); - - String xResult = xRef.xOp(); - String yResult = yRef.yOp(); - - return "C:cOp() - xResult = " + xResult + " yResult = " + yResult; - } -} diff --git a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/NestedTestCase.java b/branches/sca-java-1.2/itest/recursive/src/test/java/sample/NestedTestCase.java deleted file mode 100644 index fc5d251460..0000000000 --- a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/NestedTestCase.java +++ /dev/null @@ -1,96 +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 sample; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - - -/** - * Test for implementation.composite using implementation.composite - */ -public class NestedTestCase extends TestCase { - - /** - * Reference to the domain - */ - private SCADomain domain; - - /** - * Tear down the domain - */ - @Override - protected void tearDown() throws Exception { - if (domain != null) { - domain.close(); - } - } - - /** - * This tests having: - * - * AComponent -> implementation.composite(BComposite) - * BComposite -> implementation.composite(CComposite) - * - * This test fails. - * - * @throws Exception Failed - */ - public void testAComponent() throws Exception { - domain = SCADomain.newInstance("AComposite.composite"); - - System.out.println("Deployed names = " + domain.getComponentManager().getComponentNames()); - - C c = domain.getService(C.class, "AComponent"); - - String result = c.cOp(); - System.out.println("Method call returned [" + result + "]"); - Assert.assertNotNull(result); - Assert.assertTrue(result.indexOf("C:cOp()") != -1); - Assert.assertTrue(result.indexOf("X:xOp()") != -1); - Assert.assertTrue(result.indexOf("Y:yOp()") != -1); - } - - - /** - * This tests having: - * - * BComposite -> implementation.composite(CComposite) - * - * This test works. - * - * @throws Exception Failed - */ - public void testBComponent() throws Exception { - domain = SCADomain.newInstance("BComposite.composite"); - - System.out.println("Deployed names = " + domain.getComponentManager().getComponentNames()); - - C c = domain.getService(C.class, "BComponent"); - - String result = c.cOp(); - System.out.println("Method call returned [" + result + "]"); - Assert.assertNotNull(result); - Assert.assertTrue(result.indexOf("C:cOp()") != -1); - Assert.assertTrue(result.indexOf("X:xOp()") != -1); - Assert.assertTrue(result.indexOf("Y:yOp()") != -1); - } -} diff --git a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java b/branches/sca-java-1.2/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java deleted file mode 100644 index a543add69b..0000000000 --- a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java +++ /dev/null @@ -1,53 +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 sample; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -//FIXME Fix this test case -public class RecursiveCompositeTestCaseFIXME extends TestCase { - - private SCADomain domain; - private Service1 tracker, tracker2; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("http://localhost", "/", "Composite1.composite", "Composite2.composite"); - tracker = domain.getService(Service1.class, "ComponentC"); - tracker2 = domain.getService(Service1.class, "ComponentB"); - - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } - - public void test() throws Exception { - try { - System.out.println("Main thread " + Thread.currentThread()); - System.out.println(tracker.track("Client")); - System.out.println(tracker2.track("Client")); - } catch (Throwable t) { - t.printStackTrace(); - } - } -} diff --git a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/X.java b/branches/sca-java-1.2/itest/recursive/src/test/java/sample/X.java deleted file mode 100644 index e3a9335068..0000000000 --- a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/X.java +++ /dev/null @@ -1,32 +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 sample; - -/** - * Simple Service - */ -public interface X { - - /** - * Simple Operation - * - * @return A String - */ - String xOp(); -} diff --git a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/XImpl.java b/branches/sca-java-1.2/itest/recursive/src/test/java/sample/XImpl.java deleted file mode 100644 index e430807568..0000000000 --- a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/XImpl.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 sample; - -import org.osoa.sca.annotations.Service; - -/** - * Implementation of a simple service - */ -@Service(X.class) -public class XImpl implements X { - - /** - * Simple operation - * - * @return "X:xOp()" - */ - public String xOp() { - return "X:xOp()"; - } -} diff --git a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/Y.java b/branches/sca-java-1.2/itest/recursive/src/test/java/sample/Y.java deleted file mode 100644 index c15a4f635a..0000000000 --- a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/Y.java +++ /dev/null @@ -1,32 +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 sample; - -/** - * Simple Service - */ -public interface Y { - - /** - * Simple Operation - * - * @return A String - */ - String yOp(); -} diff --git a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/YImpl.java b/branches/sca-java-1.2/itest/recursive/src/test/java/sample/YImpl.java deleted file mode 100644 index 994c9eb95f..0000000000 --- a/branches/sca-java-1.2/itest/recursive/src/test/java/sample/YImpl.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 sample; - -import org.osoa.sca.annotations.Service; - -/** - * Implementation of a Simple Service - */ -@Service(Y.class) -public class YImpl implements Y { - - /** - * A simple operation - * - * @return "Y:yOp()" - */ - public String yOp() { - return "Y:yOp()"; - } - -} -- cgit v1.2.3