Author: antelder
Date: Thu Feb 21 05:39:33 2008
New Revision: 629778

URL: http://svn.apache.org/viewvc?rev=629778&view=rev
Log:
Add jms itest using simplest possible scdl with all defaults

Added:
    incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/
    
incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/client.composite
    
incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/service.composite
    
incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java
   (with props)

Added: 
incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/client.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/client.composite?rev=629778&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/client.composite
 (added)
+++ 
incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/client.composite
 Thu Feb 21 05:39:33 2008
@@ -0,0 +1,33 @@
+<?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="RPCComposite">
+
+    <component name="HelloWorldClient">
+        <implementation.java 
class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
+        <reference name="serviceA" />
+    </component>
+
+    <reference name="serviceA" promote="HelloWorldClient/serviceA">
+        <interface.java 
interface="org.apache.tuscany.sca.binding.jms.HelloWorldService" />
+        <binding.jms uri="jms:HelloWorldService" />
+    </reference>
+
+</composite>

Added: 
incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/service.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/service.composite?rev=629778&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/service.composite
 (added)
+++ 
incubator/tuscany/java/sca/itest/jms/src/main/resources/defaults/service.composite
 Thu Feb 21 05:39:33 2008
@@ -0,0 +1,30 @@
+<?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="RPCComposite">
+
+    <component name="HelloWorldService">
+        <implementation.java 
class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
+        <service name="HelloWorldService">
+            <binding.jms />
+        </service> 
+    </component>       
+
+</composite>

Added: 
incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java?rev=629778&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java
 (added)
+++ 
incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java
 Thu Feb 21 05:39:33 2008
@@ -0,0 +1,54 @@
+/*
+ * 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.binding.jms;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld 
application.
+ */
+public class DefaultsTestCase {
+
+    private static SCADomain scaDomain;
+
+    @Before
+    public void init() {
+        scaDomain =
+            SCADomain.newInstance("http://localhost";, "/", 
"defaults/client.composite", "defaults/service.composite");
+        // scaDomain = SCADomain.newInstance("http://localhost";, "/", 
"simple/client.composite");
+    }
+
+    @Test
+    public void testHelloWorldCreate() throws Exception {
+        HelloWorldService helloWorldService = 
scaDomain.getService(HelloWorldService.class, "HelloWorldClient");
+        assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
+    }
+
+    @After
+    public void end() {
+        if (scaDomain != null) {
+            scaDomain.close();
+        }
+    }
+}

Propchange: 
incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to