cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r1004506 - in /cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider: AegisElementProviderTest.java NoNamespaceAegisElementProvider.java
Date Tue, 05 Oct 2010 01:45:25 GMT
Author: bimargulies
Date: Tue Oct  5 01:45:25 2010
New Revision: 1004506

URL: http://svn.apache.org/viewvc?rev=1004506&view=rev
Log:
add reading test

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisElementProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceAegisElementProvider.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisElementProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisElementProviderTest.java?rev=1004506&r1=1004505&r2=1004506&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisElementProviderTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AegisElementProviderTest.java
Tue Oct  5 01:45:25 2010
@@ -81,6 +81,17 @@ public class AegisElementProviderTest ex
         assertEquals(Boolean.TRUE, bean.getBoolValue());
     }
 
+
+    @Test
+    public void testNoNamespaceReadFrom() throws Exception {
+        MessageBodyReader<AegisTestBean> p = new NoNamespaceAegisElementProvider<AegisTestBean>();
+        byte[] bytes = noNamespaceXml.getBytes("utf-8");
+        AegisTestBean bean = p.readFrom(AegisTestBean.class, null, null,
+                                          null, null, new ByteArrayInputStream(bytes));
+        assertEquals("hovercraft", bean.getStrValue());
+        assertEquals(Boolean.TRUE, bean.getBoolValue());
+    }
+
     @Test
     public void testWriteTo() throws Exception {
         MessageBodyWriter<Object> p = new AegisElementProvider<Object>();
@@ -96,7 +107,7 @@ public class AegisElementProviderTest ex
 
     @Test
     public void testNoNamespaceWriteTo() throws Exception {
-        MessageBodyWriter<Object> p = new NoNamespaceAegisElementProvider();
+        MessageBodyWriter<Object> p = new NoNamespaceAegisElementProvider<Object>();
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         AegisTestBean bean = new AegisTestBean();
         bean.setBoolValue(Boolean.TRUE);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceAegisElementProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceAegisElementProvider.java?rev=1004506&r1=1004505&r2=1004506&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceAegisElementProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceAegisElementProvider.java
Tue Oct  5 01:45:25 2010
@@ -36,7 +36,7 @@ import org.apache.cxf.common.util.SOAPCo
 /**
  * Class that sets options to disable xml namespaces.
  */
-class NoNamespaceAegisElementProvider extends AegisElementProvider<Object> {
+class NoNamespaceAegisElementProvider<T> extends AegisElementProvider<T> {
     /*
      * This can't use the cache in AbstractAegisProvider. It could have its own cache.
      */



Mime
View raw message