This is an automated email from the ASF dual-hosted git repository. amccright pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 963e900ce183c8aa83157ee8507d3b403d7e5cde Author: Andy McCright <[email protected]> AuthorDate: Fri Nov 10 09:04:10 2017 -0600 [CXF-7527] Update systests to avoid checking leading slashes Per the javadoc and RI, the strings in the list returned from getMatchedURIs does not include leading slashes. This commit updates the tests to not check for them. --- .../cxf/systest/jaxrs/JAXRSClientServerBookTest.java | 16 ++++++++-------- .../apache/cxf/systest/jaxrs/JAXRSUriInfoMatchTest.java | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java index 67a9cab..47c7ee8 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java @@ -2598,10 +2598,10 @@ public class JAXRSClientServerBookTest extends AbstractBusClientServerTestBase { @Test public void testUriInfoMatchedUrisDecode() throws Exception { - String expected = "[/bookstore/booksubresource/123/chapters/sub/1/matched!uris, " - + "/bookstore/booksubresource/123/chapters/sub/1/, " - + "/bookstore/booksubresource/123/, " - + "/bookstore]"; + String expected = "[bookstore/booksubresource/123/chapters/sub/1/matched!uris, " + + "bookstore/booksubresource/123/chapters/sub/1/, " + + "bookstore/booksubresource/123/, " + + "bookstore]"; getAndCompare("http://localhost:" + PORT + "/bookstore/" + "booksubresource/123/chapters/sub/1/matched%21uris?decode=true", expected, "text/plain", "text/plain", 200); @@ -2610,10 +2610,10 @@ public class JAXRSClientServerBookTest extends AbstractBusClientServerTestBase { @Test public void testUriInfoMatchedUrisNoDecode() throws Exception { //note '%21' instead of '!' - String expected = "[/bookstore/booksubresource/123/chapters/sub/1/matched%21uris, " - + "/bookstore/booksubresource/123/chapters/sub/1/, " - + "/bookstore/booksubresource/123/, " - + "/bookstore]"; + String expected = "[bookstore/booksubresource/123/chapters/sub/1/matched%21uris, " + + "bookstore/booksubresource/123/chapters/sub/1/, " + + "bookstore/booksubresource/123/, " + + "bookstore]"; getAndCompare("http://localhost:" + PORT + "/bookstore/" + "booksubresource/123/chapters/sub/1/matched%21uris?decode=false", expected, 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 5b21a5d..92c2400 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 @@ -60,7 +60,7 @@ public class JAXRSUriInfoMatchTest extends AbstractClientServerTestBase { WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(100000000L); wc.accept("text/plain"); String data = wc.get(String.class); - assertEquals("/my/resource/1/matched/uris,/my/resource/1", data); + assertEquals("my/resource/1/matched/uris,my/resource/1", data); } @Test public void testMatchedUrisParam() throws Exception { @@ -69,7 +69,7 @@ public class JAXRSUriInfoMatchTest extends AbstractClientServerTestBase { 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); + assertEquals("my/resource/1/matched/uris/param,my/resource/1", data); } @Test public void testMatchedUrisParam2() throws Exception { @@ -78,7 +78,7 @@ public class JAXRSUriInfoMatchTest extends AbstractClientServerTestBase { WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(100000000L); wc.accept("text/plain"); String data = wc.get(String.class); - assertEquals("/my/resource/1/matched/uris/param/2,/my/resource/1", data); + assertEquals("my/resource/1/matched/uris/param/2,my/resource/1", data); } @Test public void testMatchedResources() throws Exception { -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
