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:08:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/master b174e1d49 -> d3041f867


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

Branch: refs/heads/master
Commit: d3041f867f4d65bd5c4ba21eadcc84dc9c675c9b
Parents: b174e1d
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:08:37 2017 +0100

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


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