summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/itest/scaclient-api-rmi/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-03-02 23:30:54 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-03-02 23:30:54 +0000
commitbfa3a326441cbe17ea6786dbdd658832fc2e93b8 (patch)
tree69c7d61ba6670ae696612b1f0a374936c0d3e4a9 /sca-java-2.x/trunk/itest/scaclient-api-rmi/src
parent90b9b0f259d291fd9d5c801eb51d7fc20b265c1b (diff)
Add the ability to map binding.sca to any bindings in the runtime by configuration
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@918261 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/scaclient-api-rmi/src')
-rw-r--r--sca-java-2.x/trunk/itest/scaclient-api-rmi/src/test/java/test/scaclient/SCAClientTestCase.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/itest/scaclient-api-rmi/src/test/java/test/scaclient/SCAClientTestCase.java b/sca-java-2.x/trunk/itest/scaclient-api-rmi/src/test/java/test/scaclient/SCAClientTestCase.java
index 35e5e28194..91a3f552f4 100644
--- a/sca-java-2.x/trunk/itest/scaclient-api-rmi/src/test/java/test/scaclient/SCAClientTestCase.java
+++ b/sca-java-2.x/trunk/itest/scaclient-api-rmi/src/test/java/test/scaclient/SCAClientTestCase.java
@@ -19,14 +19,17 @@
package test.scaclient;
+import static org.junit.Assert.assertEquals;
import itest.HelloworldService;
import java.net.URI;
-import junit.framework.TestCase;
-
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.oasisopen.sca.client.SCAClientFactory;
@@ -35,9 +38,19 @@ import org.oasisopen.sca.client.SCAClientFactory;
*
* @version $Rev: 904064 $ $Date: 2010-01-28 12:31:36 +0000 (Thu, 28 Jan 2010) $
*/
-public class SCAClientTestCase extends TestCase {
+public class SCAClientTestCase {
private Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
@Test
public void testDefault() throws Exception {
@@ -77,8 +90,8 @@ public class SCAClientTestCase extends TestCase {
assertEquals("Hello petra", service.sayHello("petra"));
}
- @Override
- protected void tearDown() throws Exception {
+ @After
+ public void tearDown() throws Exception {
node.stop();
}