diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-24 10:06:29 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-24 10:06:29 +0000 |
commit | 7a7cbbe3fc4f0460e62c91d2af1c511ffcc4a4e5 (patch) | |
tree | 824d2b2994768580c012c92135c6bd6648bd515c /sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache | |
parent | c29118af5e623618c903d3fa5614db51570fc305 (diff) |
Add an async client-service itest that uses distributed nodes. This is taken out with @Ignore presently as it doesn't work due to some bugs in the Tuscany generated wsdl thats in the endpoint registry
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1161035 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache')
-rw-r--r-- | sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java b/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java new file mode 100644 index 0000000000..d506441220 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java @@ -0,0 +1,60 @@ +/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+@Ignore
+public class Test1DistributedTestCase {
+
+ private static final URI DOMAIN = URI.create("uri:Test1DistributedTestCase?bind=127.0.0.1:8765");
+ protected Node clientNode, serviceNode;
+
+ @Before
+ public void setUp() throws Exception {
+ clientNode = TuscanyRuntime.runComposite(DOMAIN, "test1Client.composite", "target/classes");
+ serviceNode = TuscanyRuntime.runComposite(DOMAIN, "test1AsyncService.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (clientNode != null) clientNode.stop();
+ if (serviceNode != null) serviceNode.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = clientNode.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
|