mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-07 06:08:00 +08:00
add test
This commit is contained in:
parent
cf1f208aa0
commit
a0a3e4905f
@ -125,6 +125,14 @@ public class HttpUtilTest {
|
|||||||
Assert.assertEquals("?#@!$%^&=dsssss555555", map.get("c").get(0));
|
Assert.assertEquals("?#@!$%^&=dsssss555555", map.get("c").get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void decodeParamMapTest() {
|
||||||
|
// 参数值存在分界标记等号时
|
||||||
|
Map<String, String> paramMap = HttpUtil.decodeParamMap("https://www.xxx.com/api.action?aa=123&f_token=NzBkMjQxNDM1MDVlMDliZTk1OTU3ZDI1OTI0NTBiOWQ=", CharsetUtil.CHARSET_UTF_8);
|
||||||
|
Assert.assertEquals("123",paramMap.get("aa"));
|
||||||
|
Assert.assertEquals("NzBkMjQxNDM1MDVlMDliZTk1OTU3ZDI1OTI0NTBiOWQ=",paramMap.get("f_token"));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void toParamsTest() {
|
public void toParamsTest() {
|
||||||
String paramsStr = "uuuu=0&a=b&c=3Ddsssss555555";
|
String paramsStr = "uuuu=0&a=b&c=3Ddsssss555555";
|
||||||
|
Loading…
Reference in New Issue
Block a user