Skip to content

Commit f5f397b

Browse files
committed
update UrlUtilsTest
1 parent b755ed2 commit f5f397b

File tree

1 file changed

+15
-3
lines changed
  • apollo-openapi/src/test/java/com/ctrip/framework/apollo/openapi/client/utils

1 file changed

+15
-3
lines changed

apollo-openapi/src/test/java/com/ctrip/framework/apollo/openapi/client/utils/UrlUtilsTest.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,30 @@
2626
* @author huanghousheng
2727
* @since 9/7/22
2828
*/
29-
public class UrlUtilsTest {
29+
public class UrlUtilsTest {
3030

3131
@Test
32-
public void testHasIllegalChar() {
32+
public void testSlash() {
3333
String someKey = "protocol//:host:port";
3434
assertTrue(UrlUtils.hasIllegalChar(someKey));
3535
}
3636

3737
@Test
38-
public void testNotHasIllegalChar() {
38+
public void testBackslash() {
39+
String someKey = "a\\c";
40+
assertTrue(UrlUtils.hasIllegalChar(someKey));
41+
}
42+
43+
@Test
44+
public void testNormalKey() {
3945
String someKey = "someKey";
4046
assertFalse(UrlUtils.hasIllegalChar(someKey));
4147
}
4248

49+
@Test
50+
public void testDot() {
51+
String someKey = "a.b";
52+
assertFalse(UrlUtils.hasIllegalChar(someKey));
53+
}
54+
4355
}

0 commit comments

Comments
 (0)