cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [1/3] cxf git commit: Adding HttpUtils test
Date Fri, 31 Mar 2017 16:25:58 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 3042e7a35 -> 326268973


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/e9e341c4
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e9e341c4
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e9e341c4

Branch: refs/heads/3.0.x-fixes
Commit: e9e341c44e7c01739548c0a81f70193bf7f12b21
Parents: c14363b
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:25:40 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/e9e341c4/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