summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/itest
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-05-05 07:29:08 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-05-05 07:29:08 +0000
commit01178cf6ceaa5ce588854a67f9228fc70644f46c (patch)
tree02c700957f9e630ff8a09f8a7354c99054e43b2a /branches/sca-java-1.x/itest
parentae2a7812558a649861233ef945f5ea29953ba26a (diff)
TUSCANY-2968 - Enabling more tests that are currently passing
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@771606 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/itest')
-rw-r--r--branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java27
-rw-r--r--branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java18
-rw-r--r--branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java8
3 files changed, 27 insertions, 26 deletions
diff --git a/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java b/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java
index 6b59aae03e..0241e073c6 100644
--- a/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java
+++ b/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java
@@ -24,8 +24,8 @@ import junit.framework.Assert;
import org.apache.tuscany.sca.host.embedded.SCADomain;
import org.json.JSONObject;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
@@ -40,21 +40,22 @@ import com.meterware.httpunit.WebResponse;
public class JSONRPCDataTypeTestCase {
private static final String SERVICE_PATH = "/EchoService";
- private static final String SERVICE_URL = "http://localhost:8085/SCADomain" + SERVICE_PATH;
- private SCADomain domain;
+ private static final String SERVICE_URL = "http://localhost:8085/" + SERVICE_PATH;
+
+ private static SCADomain domain;
- //@Before
- public void setUp() throws Exception {
- domain = SCADomain.newInstance("JSONRPCBinding.composite");
+ @BeforeClass
+ public static void setUp() throws Exception {
+ domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCBinding.composite");
}
- //@After
- public void tearDown() throws Exception {
+ @AfterClass
+ public static void tearDown() throws Exception {
domain.close();
}
- //@Test
- @Ignore("Work in progress")
+ @Test
+ //@Ignore("Work in progress")
public void testInt() throws Exception {
JSONObject jsonRequest = new JSONObject(
"{ \"method\": \"echoInt\", \"params\": [12345], \"id\": 4}");
@@ -71,8 +72,8 @@ public class JSONRPCDataTypeTestCase {
Assert.assertEquals(12345, jsonResp.getInt("result"));
}
- //@Test
- @Ignore("Work in progress")
+ @Test
+ //@Ignore("Work in progress")
public void testBoolean() throws Exception {
JSONObject jsonRequest = new JSONObject(
"{ \"method\": \"echoBoolean\", \"params\": [true], \"id\": 5}");
diff --git a/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java b/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java
index b652f742b0..94cf75d00b 100644
--- a/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java
+++ b/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java
@@ -24,8 +24,8 @@ import junit.framework.Assert;
import org.apache.tuscany.sca.host.embedded.SCADomain;
import org.json.JSONObject;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
@@ -41,17 +41,17 @@ public class JSONRPCExceptionTestCase{
private static final String SERVICE_PATH = "/EchoService";
- private static final String SERVICE_URL = "http://localhost:8085/SCADomain" + SERVICE_PATH;
+ private static final String SERVICE_URL = "http://localhost:8085/" + SERVICE_PATH;
- private SCADomain domain;
+ private static SCADomain domain;
- //@Before
- public void setUp() throws Exception {
- domain = SCADomain.newInstance("JSONRPCBinding.composite");
+ //@BeforeClass
+ public static void setUp() throws Exception {
+ domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCBinding.composite");
}
- //@After
- public void tearDown() throws Exception {
+ //@AfterClass
+ public static void tearDown() throws Exception {
domain.close();
}
diff --git a/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java b/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java
index 5a1196cde4..ac03704db0 100644
--- a/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java
+++ b/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java
@@ -52,7 +52,7 @@ public class JSONRPCServiceTestCase {
@AfterClass
public static void tearDown() throws Exception {
- domain.close();
+ domain.close();
}
@Test
@@ -65,13 +65,13 @@ public class JSONRPCServiceTestCase {
WebResponse response = wc.getResource(request);
Assert.assertEquals(200, response.getResponseCode());
-
+
JSONObject jsonResp = new JSONObject(response.getText());
Assert.assertEquals("echo: Hello JSON-RPC", jsonResp.getString("result"));
}
-
+
@Test
public void testDummy() throws Exception {
-
+
}
} \ No newline at end of file