cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject git commit: CXF-5413: Support Java API for JSON Processing. Added more test cases
Date Thu, 01 May 2014 15:42:05 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 44c52c1e5 -> ffbb46fe6


CXF-5413: Support Java API for JSON Processing. Added more test cases


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ffbb46fe
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ffbb46fe
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ffbb46fe

Branch: refs/heads/master
Commit: ffbb46fe67b38e0599b3790b5ce3a6eb99e6b593
Parents: 44c52c1
Author: reta <drreta@gmail.com>
Authored: Thu May 1 11:41:58 2014 -0400
Committer: reta <drreta@gmail.com>
Committed: Thu May 1 11:41:58 2014 -0400

----------------------------------------------------------------------
 .../cxf/systest/jaxrs/provider/JsrJsonpProviderTest.java     | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ffbb46fe/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/provider/JsrJsonpProviderTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/provider/JsrJsonpProviderTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/provider/JsrJsonpProviderTest.java
index e8ba151..e25b757 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/provider/JsrJsonpProviderTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/provider/JsrJsonpProviderTest.java
@@ -181,6 +181,14 @@ public class JsrJsonpProviderTest extends AbstractBusClientServerTestBase
{
         assertThat(((JsonObject)obj.get(0)).getInt("id"), equalTo(1));
         assertThat(((JsonObject)obj.get(0)).getString("name"), equalTo("Book 1"));
     }
+    
+    @Test
+    public void testPostBadJsonObject() {
+        final Response r = createWebClient("/bookstore/books")
+            .header("Content-Type", MediaType.APPLICATION_JSON)
+            .post("blabla");
+        assertEquals(Status.BAD_REQUEST.getStatusCode(), r.getStatus());        
+    }
 
     private static WebClient createWebClient(final String url) {
         return WebClient


Mime
View raw message