This is an automated email from the git hooks/post-receive script.

tjaalton pushed a commit to branch master
in repository jackson-jaxrs-providers.

commit 1b8341cbca86c7a89dc723750373fcf3d38b889c
Author: Tatu Saloranta <[email protected]>
Date:   Sat Feb 8 19:12:52 2014 -0800

    Test cleanup
---
 .../jackson/jaxrs/cbor/dw/SimpleEndpointTestBase.java        |  2 +-
 .../jackson/jaxrs/xml/dw/SimpleEndpointTestBase.java         | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git 
a/cbor/src/test/java/com/fasterxml/jackson/jaxrs/cbor/dw/SimpleEndpointTestBase.java
 
b/cbor/src/test/java/com/fasterxml/jackson/jaxrs/cbor/dw/SimpleEndpointTestBase.java
index 83f80b0..1e9be16 100644
--- 
a/cbor/src/test/java/com/fasterxml/jackson/jaxrs/cbor/dw/SimpleEndpointTestBase.java
+++ 
b/cbor/src/test/java/com/fasterxml/jackson/jaxrs/cbor/dw/SimpleEndpointTestBase.java
@@ -65,7 +65,7 @@ public abstract class SimpleEndpointTestBase extends 
ResourceTestBase
     /**********************************************************
      */
 
-    public void testStandardSmile() throws Exception
+    public void testSimpleObject() throws Exception
     {
         final ObjectMapper mapper = new ObjectMapper(new CBORFactory());
         Server server = startServer(TEST_PORT, SimpleResourceApp.class);
diff --git 
a/xml/src/test/java/com/fasterxml/jackson/jaxrs/xml/dw/SimpleEndpointTestBase.java
 
b/xml/src/test/java/com/fasterxml/jackson/jaxrs/xml/dw/SimpleEndpointTestBase.java
index d5d7027..2eefa2b 100644
--- 
a/xml/src/test/java/com/fasterxml/jackson/jaxrs/xml/dw/SimpleEndpointTestBase.java
+++ 
b/xml/src/test/java/com/fasterxml/jackson/jaxrs/xml/dw/SimpleEndpointTestBase.java
@@ -66,16 +66,19 @@ public abstract class SimpleEndpointTestBase extends 
ResourceTestBase
     /**********************************************************
      */
 
-    public void testStandardSmile() throws Exception
+    public void testSimplePoint() throws Exception
     {
         final ObjectMapper mapper = new XmlMapper();
         Server server = startServer(TEST_PORT, SimpleResourceApp.class);
         Point p;
+        String xml = null;
 
         try {
             InputStream in = new 
URL("http://localhost:"+TEST_PORT+"/point";).openStream();
-            p = mapper.readValue(in, Point.class);
+            byte[] bytes = readAll(in);
             in.close();
+            xml = new String(bytes, "UTF-8");
+            p = mapper.readValue(xml, Point.class);
         } finally {
             server.stop();
         }
@@ -83,6 +86,11 @@ public abstract class SimpleEndpointTestBase extends 
ResourceTestBase
         assertNotNull(p);
         assertEquals(1, p.x);
         assertEquals(2, p.y);
+
+        if (xml.indexOf("<Point") < 0 || xml.indexOf("<x>1</x>") < 0
+                || xml.indexOf("<y>2</y>") < 0) {
+            fail("Expected Point to be serialized as XML, instead got: "+xml);
+        }
     }
 
     // [Issue#34] Verify that Untouchables act the way as they should

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/jackson-jaxrs-providers.git

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to