cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1515829 - in /cxf/branches/2.6.x-fixes: ./ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
Date Tue, 20 Aug 2013 14:09:17 GMT
Author: sergeyb
Date: Tue Aug 20 14:09:16 2013
New Revision: 1515829

URL: http://svn.apache.org/r1515829
Log:
Merged revisions 1515825 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1515825 | sergeyb | 2013-08-20 16:51:25 +0300 (Tue, 20 Aug 2013) | 13 lines
  
  Merged revisions 1515823-1515824 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1515823 | sergeyb | 2013-08-20 16:38:29 +0300 (Tue, 20 Aug 2013) | 1 line
    
    [CXF-5204] Taking care of TypeVars wrapped in GenericEntity too
  ........
    r1515824 | sergeyb | 2013-08-20 16:46:00 +0300 (Tue, 20 Aug 2013) | 1 line
    
    Minor update to the test
  ........
................

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
    cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.7.x-fixes:r1515825
  Merged /cxf/trunk:r1515823-1515824

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java?rev=1515829&r1=1515828&r2=1515829&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
(original)
+++ cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
Tue Aug 20 14:09:16 2013
@@ -20,13 +20,16 @@
 package org.apache.cxf.systest.jaxrs;
 
 
+import java.util.Collections;
 import java.util.List;
 
 import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.GenericEntity;
 
 @Path("/")
 @Consumes({"application/json", "application/xml" })
@@ -50,7 +53,16 @@ public abstract class AbstractGenericBoo
         }
         throw new WebApplicationException(400);
     }
-        
+     
+    @SuppressWarnings("unchecked")
+    @GET
+    @Path("/books/superbooks2")
+    public GenericEntity<List<T>> getSuperBookCollectionGenericEntity() {
+        return new GenericEntity<List<T>>((List<T>)Collections.singletonList(
+            new SuperBook("Super", 124L, true))) {
+        };
+    }
+    
 }
 
 

Modified: cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java?rev=1515829&r1=1515828&r2=1515829&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
(original)
+++ cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
Tue Aug 20 14:09:16 2013
@@ -209,6 +209,22 @@ public class JAXRSClientServerResourceJa
     }
     
     @Test
+    public void testGetGenericSuperBookCollectionWebClient() throws Exception {
+        
+        String endpointAddress = 
+            "http://localhost:" + PORT + "/webapp/genericstore/books/superbooks2";
+        WebClient wc = WebClient.create(endpointAddress, 
+                                        Collections.singletonList(new JacksonJsonProvider()));
+        WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(100000000L);
+        wc.accept(MediaType.APPLICATION_JSON);
+        Collection<? extends SuperBook> books = wc.getCollection(SuperBook.class);
+        
+        SuperBook book = books.iterator().next();
+        assertEquals(124L, book.getId());
+        assertTrue(book.isSuperBook());
+    }
+    
+    @Test
     public void testEchoGenericSuperBookCollectionWebClientXml() throws Exception {
         
         String endpointAddress = 



Mime
View raw message