cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7351] Adding one more test
Date Wed, 03 May 2017 09:14:47 GMT
Repository: cxf
Updated Branches:
  refs/heads/master fe3fd44a8 -> e86e0a755


[CXF-7351] Adding one more test


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

Branch: refs/heads/master
Commit: e86e0a755a5acee4206beb1ccdc59d384957c922
Parents: fe3fd44
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed May 3 10:14:21 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed May 3 10:14:21 2017 +0100

----------------------------------------------------------------------
 .../cxf/systest/jaxrs/JAXRSUriInfoMatchTest.java     | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e86e0a75/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoMatchTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoMatchTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoMatchTest.java
index ee07ac0..5972a94 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoMatchTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoMatchTest.java
@@ -23,6 +23,7 @@ import java.util.List;
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
@@ -62,6 +63,15 @@ public class JAXRSUriInfoMatchTest extends AbstractClientServerTestBase
{
         assertEquals("/my/resource/1/matched/uris,/my/resource/1", data);
     }
     @Test
+    public void testMatchedUrisParam() throws Exception {
+        WebClient wc = WebClient.create("http://localhost:" + PORT 
+                                        + "/match/my/resource/1/matched/uris/param");
+        WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(100000000L);
+        wc.accept("text/plain");
+        String data = wc.get(String.class);
+        assertEquals("/my/resource/1/matched/uris/param,/my/resource/1", data);
+    }
+    @Test
     public void testMatchedResources() throws Exception {
         WebClient wc = WebClient.create("http://localhost:" + PORT + "/match/my/resource/1/matched/resources");
         WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(100000000L);
@@ -84,6 +94,11 @@ public class JAXRSUriInfoMatchTest extends AbstractClientServerTestBase
{
             return concat(uriInfo.getMatchedURIs());
         }
         @GET
+        @Path("matched/uris/param")
+        public Object getMatchedUrisParam(@PathParam("param") String param) {
+            return concat(uriInfo.getMatchedURIs());
+        }
+        @GET
         @Path("matched/resources")
         public Object getMatchedResources() {
             return concat(uriInfo.getMatchedResources());


Mime
View raw message