cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r936318 - in /cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs: BookSubresource.java BookSubresourceImpl.java
Date Wed, 21 Apr 2010 14:21:48 GMT
Author: sergeyb
Date: Wed Apr 21 14:21:48 2010
New Revision: 936318

URL: http://svn.apache.org/viewvc?rev=936318&view=rev
Log:
Missing updates to test files

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

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=936318&r1=936317&r2=936318&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
Wed Apr 21 14:21:48 2010
@@ -30,6 +30,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
 
 public interface BookSubresource {
     
@@ -60,13 +61,19 @@ public interface BookSubresource {
                      @FormParam("name") String name,
                      @FormParam("nameid") Integer nameid) throws BookNotFoundFault;
     
-    @GET
+    @POST
     @Path("/subresource4/{id}/{name}")
     @Produces("application/xml")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     Book getTheBook4(@PathParam("") Book bookPath,
                      @QueryParam("") Book bookQuery,
-                     @MatrixParam("") Book matrixBook) throws BookNotFoundFault;
+                     @MatrixParam("") Book matrixBook,
+                     @FormParam("") Book formBook) throws BookNotFoundFault;
     
+    @POST
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
+    @Produces("application/xml")
+    OrderBean addOrder(@FormParam("") OrderBean order);
     
 }
 

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=936318&r1=936317&r2=936318&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
Wed Apr 21 14:21:48 2010
@@ -19,6 +19,8 @@
 
 package org.apache.cxf.systest.jaxrs;
 
+
+
 public class BookSubresourceImpl implements BookSubresource {
 
     private Long id;
@@ -61,20 +63,25 @@ public class BookSubresourceImpl impleme
         return b;
     }
     
-    public Book getTheBook4(Book bookPath, Book bookQuery, Book bookMatrix) throws BookNotFoundFault
{
-        if (bookPath == null || bookQuery == null || bookMatrix == null) {
+    public Book getTheBook4(Book bookPath, Book bookQuery, 
+                            Book bookMatrix, Book formBook) throws BookNotFoundFault {
+        if (bookPath == null || bookQuery == null 
+            || bookMatrix == null || formBook == null) {
             throw new RuntimeException();
         }
         long id1 = bookPath.getId();
         long id2 = bookQuery.getId();
         long id3 = bookMatrix.getId();
-        if (id1 != 139L || id1 != id2 || id1 != id3 || id1 != id.longValue()) {
+        long id4 = formBook.getId();
+        if (id1 != 139L || id1 != id2 || id1 != id3 || id1 != id4 || id1 != id.longValue())
{
             throw new RuntimeException();
         }
         String name1 = bookPath.getName();
         String name2 = bookQuery.getName();
         String name3 = bookMatrix.getName();
-        if (!"CXF Rocks".equals(name1) || !name1.equals(name2) || !name1.equals(name3)) {
+        String name4 = formBook.getName();
+        if (!"CXF Rocks".equals(name1) || !name1.equals(name2) 
+            || !name1.equals(name3) || !name1.equals(name4)) {
             throw new RuntimeException();
         }
         return bookPath;
@@ -83,5 +90,9 @@ public class BookSubresourceImpl impleme
     public Book getTheBookNoProduces() throws BookNotFoundFault {
         return getTheBook();
     }
+    
+    public OrderBean addOrder(OrderBean order) {
+        return order;
+    }
 
 }



Mime
View raw message