You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by kw...@apache.org on 2007/05/04 08:11:37 UTC
svn commit: r535106 - in /incubator/tuscany/java/sca/itest/extended-api: ./
src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/sca/
src/main/java/org/apache/tusc...
Author: kwilliams
Date: Thu May 3 23:11:35 2007
New Revision: 535106
URL: http://svn.apache.org/viewvc?view=rev&rev=535106
Log:
New itest for locateService API
Added:
incubator/tuscany/java/sca/itest/extended-api/
incubator/tuscany/java/sca/itest/extended-api/pom.xml (with props)
incubator/tuscany/java/sca/itest/extended-api/src/
incubator/tuscany/java/sca/itest/extended-api/src/main/
incubator/tuscany/java/sca/itest/extended-api/src/main/java/
incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/
incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/
incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/
incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/
incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/
incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/
incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/BasicService.java (with props)
incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/
incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/BasicServiceImpl.java (with props)
incubator/tuscany/java/sca/itest/extended-api/src/main/resources/
incubator/tuscany/java/sca/itest/extended-api/src/main/resources/BasicService.composite
incubator/tuscany/java/sca/itest/extended-api/src/test/
incubator/tuscany/java/sca/itest/extended-api/src/test/java/
incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/
incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/
incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/
incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/
incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/
incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/extended/
incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/extended/ServiceLocateTestCase.java (with props)
Added: incubator/tuscany/java/sca/itest/extended-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/extended-api/pom.xml?view=auto&rev=535106
==============================================================================
--- incubator/tuscany/java/sca/itest/extended-api/pom.xml (added)
+++ incubator/tuscany/java/sca/itest/extended-api/pom.xml Thu May 3 23:11:35 2007
@@ -0,0 +1,51 @@
+<?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>tuscany-itest-extended-api</artifactId>
+ <name>Apache Tuscany SCA Extended API 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>
\ No newline at end of file
Propchange: incubator/tuscany/java/sca/itest/extended-api/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/BasicService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/BasicService.java?view=auto&rev=535106
==============================================================================
--- incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/BasicService.java (added)
+++ incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/BasicService.java Thu May 3 23:11:35 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.test.extended;
+
+public interface BasicService {
+
+ int negate(int theInt);
+
+}
Propchange: incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/BasicService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/BasicService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/BasicServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/BasicServiceImpl.java?view=auto&rev=535106
==============================================================================
--- incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/BasicServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/BasicServiceImpl.java Thu May 3 23:11:35 2007
@@ -0,0 +1,36 @@
+/*
+ * 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.test.extended.impl;
+
+import org.apache.tuscany.host.embedded.SCARuntime;
+import org.apache.tuscany.sca.test.extended.BasicService;
+
+import org.osoa.sca.ComponentContext;
+import org.osoa.sca.ServiceReference;
+import org.osoa.sca.annotations.Service;
+
+@Service(BasicService.class)
+public class BasicServiceImpl implements BasicService {
+
+ public int negate(int theInt) {
+ return -theInt;
+ }
+
+
+}
Propchange: incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/BasicServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/BasicServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/extended-api/src/main/resources/BasicService.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/extended-api/src/main/resources/BasicService.composite?view=auto&rev=535106
==============================================================================
--- incubator/tuscany/java/sca/itest/extended-api/src/main/resources/BasicService.composite (added)
+++ incubator/tuscany/java/sca/itest/extended-api/src/main/resources/BasicService.composite Thu May 3 23:11:35 2007
@@ -0,0 +1,29 @@
+<?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="BasicServiceComposite">
+
+ <component name="BasicServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.test.extended.impl.BasicServiceImpl"/>
+ </component>
+
+</composite>
Added: incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/extended/ServiceLocateTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/extended/ServiceLocateTestCase.java?view=auto&rev=535106
==============================================================================
--- incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/extended/ServiceLocateTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/extended/ServiceLocateTestCase.java Thu May 3 23:11:35 2007
@@ -0,0 +1,52 @@
+/*
+ * 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.test.extended;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.host.embedded.SCARuntimeActivator;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ServiceLocateTestCase {
+
+ @Test
+ public void locateService() {
+
+ BasicService service = SCARuntimeActivator.locateService(BasicService.class, "BasicServiceComponent");
+
+ assertEquals(-99, service.negate(99));
+
+ }
+
+ @Before
+ public void init() throws Exception {
+
+ SCARuntimeActivator.start("BasicService.composite");
+
+ }
+
+ @After
+ public void destroy() throws Exception {
+
+ SCARuntimeActivator.stop();
+
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/extended/ServiceLocateTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/extended/ServiceLocateTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org