This commit is contained in:
Looly
2022-04-29 01:56:04 +08:00
parent c753a53173
commit 67a0f31dd9
45 changed files with 154 additions and 223 deletions

View File

@@ -243,8 +243,8 @@ public class ValidatorTest {
String content = "https://detail.tmall.com/item.htm?" +
"id=639428931841&ali_refid=a3_430582_1006:1152464078:N:Sk5vwkMVsn5O6DcnvicELrFucL21A32m:0af8611e23c1d07697e";
Assert.assertTrue(Validator.isMatchRegex(Validator.URL, content));
Assert.assertTrue(Validator.isMatchRegex(Validator.URL_HTTP, content));
Assert.assertTrue(Validator.isMatchRegex(PatternPool.URL, content));
Assert.assertTrue(Validator.isMatchRegex(PatternPool.URL_HTTP, content));
}
@Test

View File

@@ -2,7 +2,7 @@ package cn.hutool.core.lang.reflect;
import cn.hutool.core.reflect.MethodHandleUtil;
import cn.hutool.core.reflect.ReflectUtil;
import cn.hutool.core.util.ClassLoaderUtil;
import cn.hutool.core.classloader.ClassLoaderUtil;
import org.junit.Assert;
import org.junit.Test;

View File

@@ -1,15 +1,16 @@
package cn.hutool.core.util;
import cn.hutool.core.classloader.ClassLoaderUtil;
import org.junit.Assert;
import org.junit.Test;
public class ClassLoaderUtilTest {
@Test
public void loadClassTest() {
String name = ClassLoaderUtil.loadClass("java.lang.Thread.State").getName();
Assert.assertEquals("java.lang.Thread$State", name);
name = ClassLoaderUtil.loadClass("java.lang.Thread$State").getName();
Assert.assertEquals("java.lang.Thread$State", name);
}