cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1500513 - in /cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs: BookSubresource.java BookSubresourceImpl.java JAXRSSoapBookTest.java
Date Sun, 07 Jul 2013 19:25:28 GMT
Author: sergeyb
Date: Sun Jul  7 19:25:28 2013
New Revision: 1500513

URL: http://svn.apache.org/r1500513
Log:
[CXF-5108] Adding a test with GET and query bean

Modified:
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java?rev=1500513&r1=1500512&r2=1500513&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
Sun Jul  7 19:25:28 2013
@@ -91,5 +91,10 @@ public interface BookSubresource {
     @Produces("application/xml")
     OrderBean addOrder(@FormParam("") OrderBean order);
     
+    @GET
+    @Path("/thebook5")
+    @Produces("application/xml")
+    Book getTheBookQueryBean(@QueryParam("") Book book) throws BookNotFoundFault;
+    
 }
 

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java?rev=1500513&r1=1500512&r2=1500513&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java
Sun Jul  7 19:25:28 2013
@@ -111,4 +111,8 @@ public class BookSubresourceImpl impleme
         return new Book(name, bookid);
     }
 
+    public Book getTheBookQueryBean(Book book) throws BookNotFoundFault {
+        return book;
+    }
+
 }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=1500513&r1=1500512&r2=1500513&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Sun Jul  7 19:25:28 2013
@@ -532,6 +532,7 @@ public class JAXRSSoapBookTest extends A
         String baseAddress = "http://localhost:" + PORT + "/test/services/rest";
         BookStoreJaxrsJaxws proxy = JAXRSClientFactory.create(baseAddress,
                                                               BookStoreJaxrsJaxws.class);
+        WebClient.getConfig(proxy).getOutInterceptors().add(new LoggingOutInterceptor());
         BookSubresource bs = proxy.getBookSubresource("139");
         Book bean = new Book("CXF Rocks", 139L);
         Book b = bs.getTheBook4(bean, bean, bean, bean);
@@ -540,6 +541,20 @@ public class JAXRSSoapBookTest extends A
     }
     
     @Test
+    public void testGetBookSubresourceParamExtensions2() throws Exception {
+        
+        String baseAddress = "http://localhost:" + PORT + "/test/services/rest";
+        BookStoreJaxrsJaxws proxy = JAXRSClientFactory.create(baseAddress,
+                                                              BookStoreJaxrsJaxws.class);
+        WebClient.getConfig(proxy).getOutInterceptors().add(new LoggingOutInterceptor());
+        BookSubresource bs = proxy.getBookSubresource("139");
+        Book bean = new Book("CXF Rocks", 139L);
+        Book b = bs.getTheBookQueryBean(bean);
+        assertEquals(139, b.getId());
+        assertEquals("CXF Rocks", b.getName());
+    }
+    
+    @Test
     public void testGetBookSubresourceParamOrder() throws Exception {
         
         String baseAddress = "http://localhost:" + PORT + "/test/services/rest";



Mime
View raw message