cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Adding HttpUtils test
Date Fri, 31 Mar 2017 16:11:24 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 12a4e8c0b -> f62e09bea


Adding HttpUtils test


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

Branch: refs/heads/3.1.x-fixes
Commit: f62e09bea57712e64e1000190726b57cb44d922b
Parents: 12a4e8c
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Mar 31 17:08:37 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Mar 31 17:11:05 2017 +0100

----------------------------------------------------------------------
 .../apache/cxf/jaxrs/utils/HttpUtilsTest.java   | 23 ++++++++++++++++++++
 1 file changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f62e09be/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java
b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java
index 601765d..a6de9db 100644
--- a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java
+++ b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/HttpUtilsTest.java
@@ -40,6 +40,29 @@ import org.junit.Test;
 public class HttpUtilsTest extends Assert {
 
     @Test
+    public void testEncodePartiallyEncoded() {
+        assertEquals("/address", HttpUtils.encodePartiallyEncoded("/address", false));
+    }
+    @Test
+    public void testEncodePartiallyEncoded2() {
+        assertEquals("/add%20ress", HttpUtils.encodePartiallyEncoded("/add ress", false));
+    }
+    @Test
+    public void testEncodePartiallyEncoded3() {
+        assertEquals("/add%20ress", HttpUtils.encodePartiallyEncoded("/add%20ress", false));
+    }
+    @Test
+    public void testEncodePartiallyEncoded4() {
+        assertEquals("http://localhost:8080/", 
+                     HttpUtils.encodePartiallyEncoded("http://localhost:8080/", false));
+    }
+    @Test
+    public void testEncodePartiallyEncoded5() {
+        assertEquals("http://localhost:8080/1/%202", 
+                     HttpUtils.encodePartiallyEncoded("http://localhost:8080/1/ 2", false));
+    }
+    
+    @Test
     public void testUrlDecode() {
         assertEquals("+ ", HttpUtils.urlDecode("%2B+"));
     }


Mime
View raw message