cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1053870 - in /cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider: JAXBElementProviderTest.java ProviderFactoryTest.java
Date Thu, 30 Dec 2010 12:26:32 GMT
Author: sergeyb
Date: Thu Dec 30 12:26:32 2010
New Revision: 1053870

URL: http://svn.apache.org/viewvc?rev=1053870&view=rev
Log:
[JAX-RS] Adding the tests to do with the update to AbstractJAXBProvider dropped during the
previous commit

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java?rev=1053870&r1=1053869&r2=1053870&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java
Thu Dec 30 12:26:32 2010
@@ -880,8 +880,19 @@ public class JAXBElementProviderTest ext
     }
     
     @Test 
-    public void testPackageContext() {
+    public void testIsReadableWithJaxbIndex() {
         JAXBElementProvider p = new JAXBElementProvider();
+        assertTrue(p.isReadable(TestBean.class, 
+                                TestBean.class, 
+                                new Annotation[]{}, MediaType.APPLICATION_XML_TYPE));
+    }
+    
+    @Test 
+    public void testPackageContextObjectFactory() {
+        JAXBElementProvider p = new JAXBElementProvider();
+        assertTrue(p.isReadable(org.apache.cxf.jaxrs.fortest.jaxb.Book.class, 
+                                org.apache.cxf.jaxrs.fortest.jaxb.Book.class, 
+                                new Annotation[]{}, MediaType.APPLICATION_XML_TYPE));
         try {
             JAXBContext context = p.getPackageContext(org.apache.cxf.jaxrs.fortest.jaxb.Book.class);
             JAXBContext context2 = p.getPackageContext(org.apache.cxf.jaxrs.fortest.jaxb.Book.class);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java?rev=1053870&r1=1053869&r2=1053870&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
Thu Dec 30 12:26:32 2010
@@ -306,10 +306,10 @@ public class ProviderFactoryTest extends
         
         MediaType mType = MediaType.valueOf(mediaType);
         
-        MessageBodyReader reader = pf.createMessageBodyReader(type, null, null, mType, new
MessageImpl());
+        MessageBodyReader reader = pf.createMessageBodyReader(type, type, null, mType, new
MessageImpl());
         assertSame("Unexpected provider found", provider, reader.getClass());
     
-        MessageBodyWriter writer = pf.createMessageBodyWriter(type, null, null, mType, new
MessageImpl());
+        MessageBodyWriter writer = pf.createMessageBodyWriter(type, type, null, mType, new
MessageImpl());
         assertTrue("Unexpected provider found", provider == writer.getClass());
     }
     



Mime
View raw message