Author: rfeng
Date: Tue Aug 21 15:33:04 2007
New Revision: 568312
URL: http://svn.apache.org/viewvc?rev=568312&view=rev
Log:
Add an itest for SCA services
Added:
incubator/tuscany/java/sca/itest/services/ (with props)
incubator/tuscany/java/sca/itest/services/pom.xml (with props)
incubator/tuscany/java/sca/itest/services/src/
incubator/tuscany/java/sca/itest/services/src/main/
incubator/tuscany/java/sca/itest/services/src/main/java/
incubator/tuscany/java/sca/itest/services/src/main/java/org/
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
(with props)
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
(with props)
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
(with props)
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
(with props)
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
(with props)
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
(with props)
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
(with props)
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
(with props)
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
(with props)
incubator/tuscany/java/sca/itest/services/src/main/resources/
incubator/tuscany/java/sca/itest/services/src/main/resources/ServicesTest.composite
incubator/tuscany/java/sca/itest/services/src/test/
incubator/tuscany/java/sca/itest/services/src/test/java/
incubator/tuscany/java/sca/itest/services/src/test/java/org/
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
(with props)
Propchange: incubator/tuscany/java/sca/itest/services/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Aug 21 15:33:04 2007
@@ -0,0 +1,13 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
Added: incubator/tuscany/java/sca/itest/services/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/pom.xml?rev=568312&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/services/pom.xml (added)
+++ incubator/tuscany/java/sca/itest/services/pom.xml Tue Aug 21 15:33:04 2007
@@ -0,0 +1,46 @@
+<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-services</artifactId>
+ <name>Apache Tuscany Services Integration Tests</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ </dependencies>
+</project>
Propchange: incubator/tuscany/java/sca/itest/services/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/services/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+
+public interface AComponent {
+ String foo();
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,28 @@
+/*
+ * 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";
+ }
+
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+public interface BComponent {
+
+ String foo();
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,31 @@
+/*
+ * 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.osoa.sca.annotations.Service;
+
[EMAIL PROTECTED](BComponent.class)
+public class BComponentImpl implements BComponent {
+
+ public String foo() {
+ return "BComponent";
+ }
+
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,27 @@
+/*
+ * 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.osoa.sca.annotations.Service;
+
[EMAIL PROTECTED]
+public interface CComponent {
+ String foo();
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,28 @@
+/*
+ * 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";
+ }
+
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+
+public interface D1Component {
+ String foo1();
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+
+public interface DComponent {
+ String foo();
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+import org.osoa.sca.annotations.Service;
+
[EMAIL PROTECTED](interfaces = {DComponent.class, D1Component.class})
+public class DComponentImpl implements DComponent, D1Component {
+
+ public String foo() {
+ return "DComponent";
+ }
+
+ public String foo1() {
+ return "DComponent";
+ }
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/services/src/main/resources/ServicesTest.composite
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/main/resources/ServicesTest.composite?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/main/resources/ServicesTest.composite
(added)
+++
incubator/tuscany/java/sca/itest/services/src/main/resources/ServicesTest.composite
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,70 @@
+<?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://www.osoa.org/xmlns/sca/1.0" 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="AComponent2Service">
+ <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="BComponent2Service">
+ <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="CComponent2Service">
+ <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="DComponent2Service">
+ <interface.java
interface="org.apache.tuscany.sca.itest.services.DComponent" />
+ </service>
+ <service name="D1Component2Service">
+ <interface.java
interface="org.apache.tuscany.sca.itest.services.D1Component" />
+ </service>
+ </component>
+
+</composite>
\ No newline at end of file
Added:
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java?rev=568312&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
(added)
+++
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
Tue Aug 21 15:33:04 2007
@@ -0,0 +1,103 @@
+/*
+ * 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 junit.framework.Assert.assertEquals;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osoa.sca.ServiceRuntimeException;
+
+public class ServicesTestCase {
+ private static SCADomain domain;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ domain = SCADomain.newInstance("ServicesTest.composite");
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ domain.close();
+ }
+
+ @Test
+ public void testAService() {
+ AComponent a1 = domain.getService(AComponent.class, "AComponent1");
+ assertEquals("AComponent", a1.foo());
+
+ AComponent a2 = domain.getService(AComponent.class,
"AComponent2/AComponent2Service");
+ assertEquals("AComponent", a2.foo());
+ }
+
+ @Test
+ public void testBService() {
+ BComponent a1 = domain.getService(BComponent.class, "BComponent1");
+ assertEquals("BComponent", a1.foo());
+
+ BComponent a2 = domain.getService(BComponent.class,
"BComponent2/BComponent2Service");
+ assertEquals("BComponent", a2.foo());
+ }
+
+ @Test
+ public void testCService() {
+ CComponent a1 = domain.getService(CComponent.class, "CComponent1");
+ assertEquals("CComponent", a1.foo());
+
+ CComponent a2 = domain.getService(CComponent.class,
"CComponent2/CComponent2Service");
+ assertEquals("CComponent", a2.foo());
+ }
+
+ @Test
+ public void testDService() {
+ DComponent a1 = domain.getService(DComponent.class,
"DComponent1/DComponent");
+ assertEquals("DComponent", a1.foo());
+
+ D1Component a2 = domain.getService(D1Component.class,
"DComponent1/D1Component");
+ assertEquals("DComponent", a2.foo1());
+
+ try {
+ domain.getService(DComponent.class, "DComponent1");
+ Assert.fail("The service name is required");
+ } catch (ServiceRuntimeException e) {
+ Assert.assertTrue("The service name is required", true);
+ }
+
+ DComponent a3 = domain.getService(DComponent.class,
"DComponent2/DComponent2Service");
+ assertEquals("DComponent", a3.foo());
+
+ D1Component a4 = domain.getService(D1Component.class,
"DComponent2/D1Component2Service");
+ 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();
+ }
+}
Propchange:
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]