summaryrefslogtreecommitdiffstats
path: root/branches/trunk-20080910/itest/recursive/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'branches/trunk-20080910/itest/recursive/src/test/java')
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/circular/include/CircularIncludeTestCase.java39
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/composite/CompositeTestCase.java51
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/composite/LocateServiceEmbeddedSCADomainTestCase.java113
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/composite/LocateServiceSCADomainTestCase.java73
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/foo/O2TestCase.java32
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/foo/O4TestCase.java39
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/policy/PolicyTestCase.java68
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/sample/C.java32
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/sample/CImpl.java80
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/sample/NestedTestCase.java96
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java53
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/sample/X.java32
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/sample/XImpl.java37
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/sample/Y.java32
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/sample/YImpl.java38
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/test/InnerTestCase.java51
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/test/OuterTestCase.java53
-rw-r--r--branches/trunk-20080910/itest/recursive/src/test/java/test1/composite/CompositeClientTestCase.java62
18 files changed, 0 insertions, 981 deletions
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/circular/include/CircularIncludeTestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/circular/include/CircularIncludeTestCase.java
deleted file mode 100644
index 1f7c35dd91..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/circular/include/CircularIncludeTestCase.java
+++ /dev/null
@@ -1,39 +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 circular.include;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.junit.Test;
-
-public class CircularIncludeTestCase {
-
- @Test
- public void testCyclicInclude() {
- SCADomain scaDomain = SCADomain.newInstance("Demo1Composite.composite");
-
- DemoClass demoService = scaDomain.getService(DemoClass.class, "Demo1Component");
- String demo = demoService.demo();
- Assert.assertEquals("hello", demo);
- scaDomain.close();
- }
-
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/composite/CompositeTestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/composite/CompositeTestCase.java
deleted file mode 100644
index 5482e47463..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/composite/CompositeTestCase.java
+++ /dev/null
@@ -1,51 +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 composite;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class CompositeTestCase extends TestCase {
-
- private SCADomain domain;
- private Source source;
-
- @Override
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("OuterComposite.composite");
- source = domain.getService(Source.class, "SourceComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- domain.close();
- }
-
- public void test() throws Exception {
- try {
- System.out.println("Main thread " + Thread.currentThread());
- source.clientMethod("Client.main");
- System.out.println("Sleeping ...");
- Thread.sleep(1000);
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/composite/LocateServiceEmbeddedSCADomainTestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/composite/LocateServiceEmbeddedSCADomainTestCase.java
deleted file mode 100644
index f042113f7a..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/composite/LocateServiceEmbeddedSCADomainTestCase.java
+++ /dev/null
@@ -1,113 +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 composite;
-
-import java.io.File;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
-
-public class LocateServiceEmbeddedSCADomainTestCase extends TestCase {
- private ClassLoader cl;
- private EmbeddedSCADomain domain;
- private Contribution contribution;
-
- @Override
- protected void setUp() throws Exception {
- // Create a test embedded SCA domain
- cl = getClass().getClassLoader();
- domain = new EmbeddedSCADomain(cl, "http://localhost");
-
- // Start the domain
- domain.start();
-
- // Contribute the SCA contribution
- ContributionService contributionService = domain.getContributionService();
-
- File contribLocation = new File("./target/classes/");
- URL contributionURL = contribLocation.toURL();
- contribution = contributionService.contribute("http://contribution", contributionURL, false);
- for (Composite deployable : contribution.getDeployables()) {
- domain.getDomainComposite().getIncludes().add(deployable);
- domain.buildComposite(deployable);
- }
-
- // Start Components from my composite
- for (Composite deployable : contribution.getDeployables() ) {
- domain.getCompositeActivator().activate(deployable);
- domain.getCompositeActivator().start(deployable);
- }
- }
-
- public void testValidLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponent");
- assertNotNull(source);
- } catch (Throwable t) {
- fail("Could not locate service");
- }
- }
-
- public void testInvalidLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponentXXX");
- // The source proxy can be created for the remote target but it will throw exception when a method is invoked
- source.clientMethod("ABC");
- fail("Expected to generate org.osoa.sca.ServiceRuntimeException but did not when invoking service with async");
- } catch (org.osoa.sca.ServiceRuntimeException e) {
- // expected.
- }
- }
-
- public void testValidRecursiveLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponent/InnerSourceService");
- assertNotNull(source);
- } catch (Throwable t) {
- fail("Could not locate service");
- }
- }
-
- @Override
- public void tearDown() throws Exception {
- ContributionService contributionService = domain.getContributionService();
-
- // Remove the contribution from the in-memory repository
- contributionService.remove("http://contribution");
-
- // Stop Components from my composite
- for (Composite deployable : contribution.getDeployables() ) {
- domain.getCompositeActivator().stop(deployable);
- domain.getCompositeActivator().deactivate(deployable);
- }
-
- domain.stop();
- domain.close();
- }
-
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/composite/LocateServiceSCADomainTestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/composite/LocateServiceSCADomainTestCase.java
deleted file mode 100644
index 87eb948452..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/composite/LocateServiceSCADomainTestCase.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package composite;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class LocateServiceSCADomainTestCase extends TestCase {
-
- private SCADomain domain;
-
-
- @Override
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("OuterComposite.composite");
- }
-
- @Override
- protected void tearDown() throws Exception {
- domain.close();
- }
-
- public void testValidLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponent");
- assertNotNull(source);
- } catch (Throwable t) {
- fail("Could not locate service");
- }
- }
-
- public void testInvalidLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponentXXX");
- // The source proxy can be created for the remote target but it will throw exception when a method is invoked
- source.clientMethod("ABC");
- fail("Expected to generate org.osoa.sca.ServiceRuntimeException but did not when invoking service with async");
- } catch (org.osoa.sca.ServiceRuntimeException e) {
- // expected.
- }
- }
-
- public void testValidRecursiveLocateService() throws Exception {
- Source source;
- try {
- source = domain.getService(Source.class, "SourceComponent/InnerSourceService");
- assertNotNull(source);
- } catch (Throwable t) {
- fail("Could not locate service");
- }
- }
-
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/foo/O2TestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/foo/O2TestCase.java
deleted file mode 100644
index d617ec8592..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/foo/O2TestCase.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 foo;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class O2TestCase extends TestCase {
-
- public void testGet() throws Exception {
- SCADomain sca = SCADomain.newInstance("foo/o2.composite");
- I i = sca.getService(I.class, "O1Component");
- assertEquals("foo.A", i.get(0));
- }
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/foo/O4TestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/foo/O4TestCase.java
deleted file mode 100644
index 15626c75ac..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/foo/O4TestCase.java
+++ /dev/null
@@ -1,39 +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 foo;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class O4TestCase extends TestCase {
-
- public void testO3Component() throws Exception {
- SCADomain sca = SCADomain.newInstance("foo/o4.composite");
- I i = sca.getService(I.class, "O3Component");
- assertEquals("foo.A", i.get(0));
- }
-
- public void testO2Component() throws Exception {
- SCADomain sca = SCADomain.newInstance("foo/o4.composite");
- I i = sca.getService(I.class, "O2Component");
- assertEquals("foo.A", i.get(0));
- }
-
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/policy/PolicyTestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/policy/PolicyTestCase.java
deleted file mode 100644
index c9cc84f7d4..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/policy/PolicyTestCase.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package policy;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.impl.CompositeImpl;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class PolicyTestCase {
-
- private SCADomain domain;
- private Target targetClient;
-
- @Before
- public void setUp() throws Exception {
- domain = SCADomain.newInstance("policy/PolicyOuterComposite.composite");
- targetClient = domain.getService(Target.class, "TargetClientComponent");
- }
-
- @After
- public void tearDown() throws Exception {
- domain.close();
- }
-
- @Test
- public void test() throws Exception {
- try {
- //Check that the implementation policy sets don't flow down to the components
- //implementations that are themselves composites (implementation.composite)
- Component outerComponent = ((DefaultSCADomain)domain).getComponent("OuterTargetServiceComponent");
-
- Assert.assertEquals(0, outerComponent.getPolicySets().size());
-
- for (Component component :((CompositeImpl)outerComponent.getImplementation()).getComponents()){
- Assert.assertEquals(0, component.getPolicySets().size());
- }
-
- // debugging
- String result = targetClient.hello("Fred");
-
- System.out.println(result);
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/sample/C.java b/branches/trunk-20080910/itest/recursive/src/test/java/sample/C.java
deleted file mode 100644
index bf8391348b..0000000000
--- a/branches/trunk-20080910/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/trunk-20080910/itest/recursive/src/test/java/sample/CImpl.java b/branches/trunk-20080910/itest/recursive/src/test/java/sample/CImpl.java
deleted file mode 100644
index 466284983e..0000000000
--- a/branches/trunk-20080910/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/trunk-20080910/itest/recursive/src/test/java/sample/NestedTestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/sample/NestedTestCase.java
deleted file mode 100644
index fc5d251460..0000000000
--- a/branches/trunk-20080910/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/trunk-20080910/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java b/branches/trunk-20080910/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java
deleted file mode 100644
index a543add69b..0000000000
--- a/branches/trunk-20080910/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/trunk-20080910/itest/recursive/src/test/java/sample/X.java b/branches/trunk-20080910/itest/recursive/src/test/java/sample/X.java
deleted file mode 100644
index e3a9335068..0000000000
--- a/branches/trunk-20080910/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/trunk-20080910/itest/recursive/src/test/java/sample/XImpl.java b/branches/trunk-20080910/itest/recursive/src/test/java/sample/XImpl.java
deleted file mode 100644
index e430807568..0000000000
--- a/branches/trunk-20080910/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/trunk-20080910/itest/recursive/src/test/java/sample/Y.java b/branches/trunk-20080910/itest/recursive/src/test/java/sample/Y.java
deleted file mode 100644
index c15a4f635a..0000000000
--- a/branches/trunk-20080910/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/trunk-20080910/itest/recursive/src/test/java/sample/YImpl.java b/branches/trunk-20080910/itest/recursive/src/test/java/sample/YImpl.java
deleted file mode 100644
index 994c9eb95f..0000000000
--- a/branches/trunk-20080910/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()";
- }
-
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/test/InnerTestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/test/InnerTestCase.java
deleted file mode 100644
index ebb4bc7acb..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/test/InnerTestCase.java
+++ /dev/null
@@ -1,51 +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 test;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class InnerTestCase extends TestCase {
-
- private SCADomain domain;
- private Aggregator aggregator;
-
- @Override
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("Inner.composite");
- aggregator = domain.getService(Aggregator.class, "Aggregator");
- }
-
- @Override
- protected void tearDown() throws Exception {
- domain.close();
- }
-
- public void test() throws Exception {
- try {
- String result = aggregator.getAggregatedData();
- assertTrue(result.contains("InnerSource"));
- assertTrue(result.contains("InnerSource"));
- System.out.println(result);
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/test/OuterTestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/test/OuterTestCase.java
deleted file mode 100644
index 6e95f5808b..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/test/OuterTestCase.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 test;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class OuterTestCase {
-
- private SCADomain domain;
- private Aggregator aggregator;
-
- @Before
- public void setUp() throws Exception {
- domain = SCADomain.newInstance("Outer.composite");
- aggregator = domain.getService(Aggregator.class, "Inner");
- }
-
- @After
- public void tearDown() throws Exception {
- domain.close();
- }
-
- @Ignore("TUSCANY-2484")
- @Test
- public void test() throws Exception {
- String result = aggregator.getAggregatedData();
- Assert.assertTrue(result.contains("InnerSource"));
- Assert.assertTrue(result.contains("OuterSource"));
- System.out.println(result);
- }
-}
diff --git a/branches/trunk-20080910/itest/recursive/src/test/java/test1/composite/CompositeClientTestCase.java b/branches/trunk-20080910/itest/recursive/src/test/java/test1/composite/CompositeClientTestCase.java
deleted file mode 100644
index b3abcac06e..0000000000
--- a/branches/trunk-20080910/itest/recursive/src/test/java/test1/composite/CompositeClientTestCase.java
+++ /dev/null
@@ -1,62 +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 test1.composite;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * Simple client program that invokes the components that we wired together.
- */
-public class CompositeClientTestCase extends TestCase {
-
- private SCADomain scaDomain;
- private Target target;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("test1/OuterComposite.composite");
- target = scaDomain.getService(Target.class, "Test1TargetComponent/Service_Two");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void testComposite() throws Exception {
- String res = target.hello("Wang Feng");
- assertEquals("TargetTwo: Hello Wang Feng!", res);
- }
-
- // Test for problem in TUSCANY-2010
- public void testURLs() throws Exception {
- try {
- System.out.println("Component URI: " + scaDomain.getComponentManager().getComponent("Test1TargetComponent").getURI());
- System.out.println(" Service Name: " + scaDomain.getComponentManager().getComponent("Test1TargetComponent").getServices().get(0).getName());
- System.out.println(" Binding Name: " + scaDomain.getComponentManager().getComponent("Test1TargetComponent").getServices().get(0).getBindings().get(0).getName());
- System.out.println(" Binding URI: " + scaDomain.getComponentManager().getComponent("Test1TargetComponent").getServices().get(0).getBindings().get(0).getURI());
- assertEquals("/Test1TargetComponent/Service_One", scaDomain.getComponentManager().getComponent("Test1TargetComponent").getServices().get(0).getBindings().get(0).getURI());
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
-}