File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
apollo-openapi/src/test/java/com/ctrip/framework/apollo/openapi/client/utils Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments