summaryrefslogtreecommitdiffstats
path: root/sandbox/ant/sca/trunk/itest/services/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java27
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java28
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java25
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java31
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java27
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java28
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java24
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java24
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java34
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/resources/META-INF/sca-contribution.xml22
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/main/resources/ServicesTest.composite70
-rw-r--r--sandbox/ant/sca/trunk/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java108
12 files changed, 0 insertions, 448 deletions
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java b/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
deleted file mode 100644
index 26e58dc530..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
+++ /dev/null
@@ -1,27 +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.services;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface AComponent {
- String foo();
-}
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java b/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
deleted file mode 100644
index 627ff4976f..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
+++ /dev/null
@@ -1,28 +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.services;
-
-public class AComponentImpl implements AComponent {
-
- public String foo() {
- return "AComponent";
- }
-
-}
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java b/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
deleted file mode 100644
index d04bd1b985..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
+++ /dev/null
@@ -1,25 +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.services;
-
-public interface BComponent {
-
- String foo();
-}
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java b/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
deleted file mode 100644
index 01df89a8fa..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
+++ /dev/null
@@ -1,31 +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.services;
-
-import org.oasisopen.sca.annotation.Service;
-
-@Service(BComponent.class)
-public class BComponentImpl implements BComponent {
-
- public String foo() {
- return "BComponent";
- }
-
-}
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java b/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
deleted file mode 100644
index 07397e4502..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
+++ /dev/null
@@ -1,27 +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.services;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface CComponent {
- String foo();
-}
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java b/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
deleted file mode 100644
index 8713e5ab22..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
+++ /dev/null
@@ -1,28 +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.services;
-
-public class CComponentImpl implements CComponent {
-
- public String foo() {
- return "CComponent";
- }
-
-}
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java b/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
deleted file mode 100644
index 842a85e000..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
+++ /dev/null
@@ -1,24 +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.services;
-
-public interface D1Component {
- String foo1();
-}
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java b/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
deleted file mode 100644
index 8a3923b351..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
+++ /dev/null
@@ -1,24 +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.services;
-
-public interface DComponent {
- String foo();
-}
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java b/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
deleted file mode 100644
index 59ffce8205..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
+++ /dev/null
@@ -1,34 +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.services;
-
-import org.oasisopen.sca.annotation.Service;
-
-@Service(interfaces = {DComponent.class, D1Component.class})
-public class DComponentImpl implements DComponent, D1Component {
-
- public String foo() {
- return "DComponent";
- }
-
- public String foo1() {
- return "DComponent";
- }
-}
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/resources/META-INF/sca-contribution.xml b/sandbox/ant/sca/trunk/itest/services/src/main/resources/META-INF/sca-contribution.xml
deleted file mode 100644
index a3c87f60c7..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/resources/META-INF/sca-contribution.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" targetNamespace="http://foo" xmlns:foo="http://foo">
- <deployable composite="foo:InnerServicesTest" />
-</contribution> \ No newline at end of file
diff --git a/sandbox/ant/sca/trunk/itest/services/src/main/resources/ServicesTest.composite b/sandbox/ant/sca/trunk/itest/services/src/main/resources/ServicesTest.composite
deleted file mode 100644
index 9b7a30d850..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/main/resources/ServicesTest.composite
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:foo="http://foo" targetNamespace="http://foo"
- name="InnerServicesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <component name="AComponent1">
- <implementation.java class="org.apache.tuscany.sca.itest.services.AComponentImpl" />
- </component>
-
- <component name="AComponent2">
- <implementation.java class="org.apache.tuscany.sca.itest.services.AComponentImpl" />
- <service name="AComponent">
- <interface.java interface="org.apache.tuscany.sca.itest.services.AComponent" />
- </service>
- </component>
-
- <component name="BComponent1">
- <implementation.java class="org.apache.tuscany.sca.itest.services.BComponentImpl" />
- </component>
-
- <component name="BComponent2">
- <implementation.java class="org.apache.tuscany.sca.itest.services.BComponentImpl" />
- <service name="BComponent">
- <interface.java interface="org.apache.tuscany.sca.itest.services.BComponent" />
- </service>
- </component>
-
- <component name="CComponent1">
- <implementation.java class="org.apache.tuscany.sca.itest.services.CComponentImpl" />
- </component>
-
- <component name="CComponent2">
- <implementation.java class="org.apache.tuscany.sca.itest.services.CComponentImpl" />
- <service name="CComponent">
- <interface.java interface="org.apache.tuscany.sca.itest.services.CComponent" />
- </service>
- </component>
-
- <component name="DComponent1">
- <implementation.java class="org.apache.tuscany.sca.itest.services.DComponentImpl" />
- </component>
-
- <component name="DComponent2">
- <implementation.java class="org.apache.tuscany.sca.itest.services.DComponentImpl" />
- <service name="DComponent">
- <interface.java interface="org.apache.tuscany.sca.itest.services.DComponent" />
- </service>
- <service name="D1Component">
- <interface.java interface="org.apache.tuscany.sca.itest.services.D1Component" />
- </service>
- </component>
-
-</composite> \ No newline at end of file
diff --git a/sandbox/ant/sca/trunk/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java b/sandbox/ant/sca/trunk/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
deleted file mode 100644
index da779b2c54..0000000000
--- a/sandbox/ant/sca/trunk/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
+++ /dev/null
@@ -1,108 +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.services;
-
-import static org.junit.Assert.assertEquals;
-
-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.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.oasisopen.sca.ServiceRuntimeException;
-
-public class ServicesTestCase {
- private static Node node;
-
- @BeforeClass
- public static void init() throws Exception {
- String location = ContributionLocationHelper.getContributionLocation("ServicesTest.composite");
- node = NodeFactory.newInstance().createNode("ServicesTest.composite", new Contribution("c1", location));
- node.start();
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- node.stop();
- }
-
- @Test
- public void testAService() {
- AComponent a1 = node.getService(AComponent.class, "AComponent1");
- assertEquals("AComponent", a1.foo());
-
- AComponent a2 = node.getService(AComponent.class, "AComponent2/AComponent");
- assertEquals("AComponent", a2.foo());
- }
-
- @Test
- public void testBService() {
- BComponent a1 = node.getService(BComponent.class, "BComponent1");
- assertEquals("BComponent", a1.foo());
-
- BComponent a2 = node.getService(BComponent.class, "BComponent2/BComponent");
- assertEquals("BComponent", a2.foo());
- }
-
- @Test
- public void testCService() {
- CComponent a1 = node.getService(CComponent.class, "CComponent1");
- assertEquals("CComponent", a1.foo());
-
- CComponent a2 = node.getService(CComponent.class, "CComponent2/CComponent");
- assertEquals("CComponent", a2.foo());
- }
-
- @Test
- public void testDService() {
- DComponent a1 = node.getService(DComponent.class, "DComponent1/DComponent");
- assertEquals("DComponent", a1.foo());
-
- D1Component a2 = node.getService(D1Component.class, "DComponent1/D1Component");
- assertEquals("DComponent", a2.foo1());
-
- try {
- node.getService(DComponent.class, "DComponent1");
- Assert.fail("The service name is required");
- } catch (ServiceRuntimeException e) {
- Assert.assertTrue("The service name is required", true);
- }
-
- DComponent a3 = node.getService(DComponent.class, "DComponent2/DComponent");
- assertEquals("DComponent", a3.foo());
-
- D1Component a4 = node.getService(D1Component.class, "DComponent2/D1Component");
- assertEquals("DComponent", a4.foo1());
-
- }
-
- public static void main(String[] args) throws Exception {
- ServicesTestCase.init();
- ServicesTestCase tester = new ServicesTestCase();
- tester.testAService();
- tester.testBService();
- tester.testCService();
- tester.testDService();
- ServicesTestCase.destroy();
- }
-}