调整方法修饰符为public并添加junit测试例子

This commit is contained in:
zhaoxinhu
2022-08-18 09:02:43 +08:00
parent 914463b4d8
commit 331fd1f2bc
2 changed files with 10 additions and 2 deletions

View File

@@ -15,4 +15,12 @@ public class PunyCodeTest {
decode = PunyCode.decode("xn--Hutool-ux9js33tgln");
Assert.assertEquals(text, decode);
}
@Test
public void encodeEncodeDomainTest(){
String domain = "赵新虎.中国";
String strPunyCode = PunyCode.encodeDomain(domain);
String decode = PunyCode.decodeDomain(strPunyCode);
Assert.assertEquals(decode, domain);
}
}