mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix bug
This commit is contained in:
@@ -479,4 +479,19 @@ public class UrlBuilderTest {
|
||||
UrlBuilder.of().addPath("//");
|
||||
UrlBuilder.of().addPath("//a");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ofHttpTest() {
|
||||
UrlBuilder ofHttp = UrlBuilder.ofHttp("http://hutool.cn");
|
||||
Assert.assertEquals("http://hutool.cn", ofHttp.toString());
|
||||
|
||||
ofHttp = UrlBuilder.ofHttp("https://hutool.cn");
|
||||
Assert.assertEquals("https://hutool.cn", ofHttp.toString());
|
||||
|
||||
ofHttp = UrlBuilder.ofHttp("hutool.cn");
|
||||
Assert.assertEquals("http://hutool.cn", ofHttp.toString());
|
||||
|
||||
ofHttp = UrlBuilder.ofHttp("hutool.cn?old=http://aaa");
|
||||
Assert.assertEquals("http://hutool.cn?old=http://aaa", ofHttp.toString());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user