cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: Updating a WADLGenerator test again
Date Tue, 23 Sep 2014 11:18:41 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 2665d9a3d -> 924269f11


Updating a WADLGenerator test again


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/924269f1
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/924269f1
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/924269f1

Branch: refs/heads/master
Commit: 924269f1131290f7564d2300d41340952742bd30
Parents: 2665d9a
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Tue Sep 23 12:18:29 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Tue Sep 23 12:18:29 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/model/wadl/BookStore.java   |  4 ++--
 .../apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java    | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/924269f1/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
index 54baeaf..23304b3 100644
--- a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
+++ b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookStore.java
@@ -67,7 +67,7 @@ public class BookStore implements BookDescription {
     @Descriptions({ 
         @Description(value = "Get Books", target = DocTarget.METHOD)
     })
-    public List<Book> getBooks(@PathParam("id") Long id) {
+    public List<Book> getBooks(@PathParam("id") Long id, @BeanParam TheBeanParam beanParam)
{
         return Collections.emptyList();
     }
     
@@ -181,7 +181,7 @@ public class BookStore implements BookDescription {
         public int getA() {
             return a;
         }
-        @HeaderParam("a")
+        @PathParam("a")
         public void setA(int a) {
             this.a = a;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/924269f1/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
index 5136a2a..09dd51b 100644
--- a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
+++ b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
@@ -472,8 +472,9 @@ public class WadlGeneratorTest extends Assert {
         
         // verify root resource starting with "/"
         // must have a single template parameter
-        verifyParameters(resource, 1, 
-                         new Param("id", "template", "xs:long"));
+        verifyParameters(resource, 2, 
+                         new Param("id", "template", "xs:long"),
+                         new Param("a", "template", "xs:int"));
         
         // must have 4 methods, 2 GETs, POST and PUT
         List<Element> methodEls = getElements(resource, "method", 4);
@@ -586,9 +587,8 @@ public class WadlGeneratorTest extends Assert {
         // check request 
         List<Element> requestEls = getElements(methodEl, "request", 1);
         
-        // 7 parameters are expected
-        verifyParameters(requestEls.get(0), 7,
-                         new Param("a", "header", "xs:int"),
+        // 6 parameters are expected
+        verifyParameters(requestEls.get(0), 6,
                          new Param("b", "query", "xs:int"),
                          new Param("aProp", "query", "xs:int"),
                          new Param("c.a", "query", "xs:int"),


Mime
View raw message