diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-28 12:31:36 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-28 12:31:36 +0000 |
commit | 19a4e897937244586853e0e72e5fa418ce92bb04 (patch) | |
tree | 7441ba60cc75693a5a2670ec52a49653bfe394db /sca-java-2.x/trunk/itest/scaclient-api | |
parent | 32f41f3e6cc2dcce53e1918ae18d30c59c1083f1 (diff) |
Simpify be merging into a single test
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@904064 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/scaclient-api')
2 files changed, 17 insertions, 65 deletions
diff --git a/sca-java-2.x/trunk/itest/scaclient-api/src/test/java/test/scaclient/DomainURITestCase.java b/sca-java-2.x/trunk/itest/scaclient-api/src/test/java/test/scaclient/DomainURITestCase.java deleted file mode 100644 index efcd47421e..0000000000 --- a/sca-java-2.x/trunk/itest/scaclient-api/src/test/java/test/scaclient/DomainURITestCase.java +++ /dev/null @@ -1,58 +0,0 @@ -/*
- * 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 test.scaclient;
-
-import itest.HelloworldService;
-
-import java.net.URI;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.apache.tuscany.sca.runtime.Version;
-import org.junit.Test;
-import org.oasisopen.sca.client.SCAClientFactory;
-
-/**
- * Tests various permutations of creating Nodes and SCAClients
- */
-public class DomainURITestCase extends TestCase {
-
- @Test
- public void testDefault() throws Exception {
-
- Node node = NodeFactory.getInstance().createNode((String)null, new String[] {"target/classes"});
- node.start();
-
- HelloworldService service = SCAClientFactory.newInstance(URI.create("default")).getService(HelloworldService.class, "HelloworldComponent");
- assertEquals("Hello petra", service.sayHello("petra"));
- }
-
- @Test
- public void testExplicit() throws Exception {
-
- Node node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
- node.start();
-
- HelloworldService service = SCAClientFactory.newInstance(URI.create("myFooDomain")).getService(HelloworldService.class, "HelloworldComponent");
- assertEquals("Hello petra", service.sayHello("petra"));
- }
-}
diff --git a/sca-java-2.x/trunk/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java b/sca-java-2.x/trunk/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java index 88921b2687..5e35fa674c 100644 --- a/sca-java-2.x/trunk/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java +++ b/sca-java-2.x/trunk/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java @@ -20,11 +20,14 @@ package test.scaclient; import itest.HelloworldService; -import junit.framework.TestCase; + import java.net.URI; +import junit.framework.TestCase; + import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.Test; import org.oasisopen.sca.client.SCAClientFactory; /** @@ -36,15 +39,22 @@ public class SCAClientTestCase extends TestCase { private Node node; - @Override - protected void setUp() throws Exception { - node = NodeFactory.getInstance().createNode(); + @Test + public void testDefault() throws Exception { + + node = NodeFactory.getInstance().createNode((String)null, new String[] {"target/classes"}); node.start(); + + HelloworldService service = SCAClientFactory.newInstance(URI.create("default")).getService(HelloworldService.class, "HelloworldComponent"); + assertEquals("Hello petra", service.sayHello("petra")); } - public void testInvoke() throws Exception { - HelloworldService service = - SCAClientFactory.newInstance(URI.create("default")).getService(HelloworldService.class, "HelloworldComponent"); + @Test + public void testExplicit() throws Exception { + node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"}); + node.start(); + + HelloworldService service = SCAClientFactory.newInstance(URI.create("myFooDomain")).getService(HelloworldService.class, "HelloworldComponent"); assertEquals("Hello petra", service.sayHello("petra")); } |