You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/03/25 06:27:44 UTC
[camel] branch master updated: CAMEL-16016: Added unit test
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new f09855f CAMEL-16016: Added unit test
f09855f is described below
commit f09855faf320b574bad0e886b99ccb5a373991cc
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 25 07:27:09 2021 +0100
CAMEL-16016: Added unit test
---
.../org/apache/camel/util/UnsafeCharactersEncoderTest.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/core/camel-core/src/test/java/org/apache/camel/util/UnsafeCharactersEncoderTest.java b/core/camel-core/src/test/java/org/apache/camel/util/UnsafeCharactersEncoderTest.java
index 86be734..a27a6ce 100644
--- a/core/camel-core/src/test/java/org/apache/camel/util/UnsafeCharactersEncoderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/util/UnsafeCharactersEncoderTest.java
@@ -88,4 +88,16 @@ public class UnsafeCharactersEncoderTest {
testEncoding(beforeEncoding, afterEncoding);
}
+ @Test
+ public void testPasswordEncodingInRawMode(){
+ String password= "RAW(%j#7%c6i)";
+ String result = UnsafeUriCharactersEncoder.encode(password, true);
+ // remove RAW
+ result = result.substring(4);
+ result = result.substring(0, result.length() - 1);
+ String expected = "%25j%237%25c6i";
+
+ assertEquals(result, expected, "Get the wrong encoding result");
+ }
+
}