You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2007/07/21 11:53:12 UTC

svn commit: r558282 - in /incubator/tuscany/java/sca/itest/conversations/src: main/java/org/apache/tuscany/sca/itest/conversational/impl/ main/resources/ test/java/org/apache/tuscany/sca/itest/conversational/

Author: antelder
Date: Sat Jul 21 02:53:11 2007
New Revision: 558282

URL: http://svn.apache.org/viewvc?view=rev&rev=558282
Log:
Conversations, add conversationid test

Added:
    incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java   (with props)
    incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java   (with props)
    incubator/tuscany/java/sca/itest/conversations/src/main/resources/conversationId.composite
    incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTest.java   (with props)

Added: incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java?view=auto&rev=558282
==============================================================================
--- incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java (added)
+++ incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java Sat Jul 21 02:53:11 2007
@@ -0,0 +1,47 @@
+/*
+ * 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.conversational.impl;
+
+import org.osoa.sca.annotations.ConversationID;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+@Service(ConversationIdService.class)
+@Scope("CONVERSATION")
+public class ConversationIdComponentImpl implements ConversationIdService {
+
+    @ConversationID
+    public String cid;
+
+    private String setterCid;
+    
+    public String getCIDField() {
+        return cid;
+    }
+    public String getCIDSetter() {
+        return setterCid;
+    }
+    
+
+    @ConversationID
+    public void setCID(String cid) {
+        this.setterCid = cid;
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java?view=auto&rev=558282
==============================================================================
--- incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java (added)
+++ incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java Sat Jul 21 02:53:11 2007
@@ -0,0 +1,29 @@
+/*
+ * 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.conversational.impl;
+
+import org.osoa.sca.annotations.Conversational;
+
+@Conversational
+public interface ConversationIdService {
+
+    String getCIDField();
+    String getCIDSetter();
+}

Propchange: incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/conversations/src/main/resources/conversationId.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/conversations/src/main/resources/conversationId.composite?view=auto&rev=558282
==============================================================================
--- incubator/tuscany/java/sca/itest/conversations/src/main/resources/conversationId.composite (added)
+++ incubator/tuscany/java/sca/itest/conversations/src/main/resources/conversationId.composite Sat Jul 21 02:53:11 2007
@@ -0,0 +1,27 @@
+<?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"
+	name="ConversationalIdTest">
+ 	      
+    <component name="ConversationIdComponent">
+		<implementation.java class="org.apache.tuscany.sca.itest.conversational.impl.ConversationIdComponentImpl"/>
+	</component>          
+     
+</composite>

Added: incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTest.java?view=auto&rev=558282
==============================================================================
--- incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTest.java (added)
+++ incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTest.java Sat Jul 21 02:53:11 2007
@@ -0,0 +1,55 @@
+/*
+ * 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.conversational;
+
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.itest.conversational.impl.ConversationIdService;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ConversationIdTest {
+
+    private SCADomain domain;
+
+    @Before
+    public void setUp() throws Exception {
+        domain = SCADomain.newInstance("conversationId.composite");
+
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        if (domain != null) {
+            domain.close();
+        }
+    }
+
+    @Test
+    public void testConversationId() {
+        ConversationIdService service =
+            domain.getService(ConversationIdService.class, "ConversationIdComponent");
+        Assert.assertNotNull(service.getCIDField());
+        Assert.assertNotNull(service.getCIDSetter());
+    }
+
+}

Propchange: incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTest.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