mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -8,7 +8,7 @@ public class ClassLoaderUtilTest {
|
||||
|
||||
@Test
|
||||
public void isPresentTest() {
|
||||
final boolean present = ClassLoaderUtil.isPresent("classloader.org.dromara.hutool.core.ClassLoaderUtil");
|
||||
final boolean present = ClassLoaderUtil.isPresent("org.dromara.hutool.core.classloader.ClassLoaderUtil");
|
||||
Assertions.assertTrue(present);
|
||||
}
|
||||
|
||||
|
@@ -311,7 +311,7 @@ public class ConvertTest {
|
||||
|
||||
@Test
|
||||
public void toClassTest(){
|
||||
final Class<?> convert = Convert.convert(Class.class, "convert.org.dromara.hutool.core.ConvertTest.Product");
|
||||
final Class<?> convert = Convert.convert(Class.class, "org.dromara.hutool.core.convert.ConvertTest.Product");
|
||||
Assertions.assertSame(Product.class, convert);
|
||||
}
|
||||
|
||||
|
@@ -11,6 +11,6 @@ public class CallerUtilTest {
|
||||
Assertions.assertEquals("getCallerMethodNameTest", callerMethodName);
|
||||
|
||||
final String fullCallerMethodName = CallerUtil.getCallerMethodName(true);
|
||||
Assertions.assertEquals("caller.lang.org.dromara.hutool.core.CallerUtilTest.getCallerMethodNameTest", fullCallerMethodName);
|
||||
Assertions.assertEquals("org.dromara.hutool.core.lang.caller.CallerUtilTest.getCallerMethodNameTest", fullCallerMethodName);
|
||||
}
|
||||
}
|
||||
|
@@ -149,11 +149,11 @@ public class MethodUtilTest {
|
||||
Assertions.assertEquals(3, methods.length);
|
||||
|
||||
// getA属于本类
|
||||
Assertions.assertEquals("public void reflect.org.dromara.hutool.core.ReflectUtilTest$C2.getA()", methods[0].toString());
|
||||
Assertions.assertEquals("public void org.dromara.hutool.core.reflect.ReflectUtilTest$C2.getA()", methods[0].toString());
|
||||
// getB属于父类
|
||||
Assertions.assertEquals("public void reflect.org.dromara.hutool.core.ReflectUtilTest$C1.getB()", methods[1].toString());
|
||||
Assertions.assertEquals("public void org.dromara.hutool.core.reflect.ReflectUtilTest$C1.getB()", methods[1].toString());
|
||||
// getC属于接口中的默认方法
|
||||
Assertions.assertEquals("public default void reflect.org.dromara.hutool.core.ReflectUtilTest$TestInterface1.getC()", methods[2].toString());
|
||||
Assertions.assertEquals("public default void org.dromara.hutool.core.reflect.ReflectUtilTest$TestInterface1.getC()", methods[2].toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -17,7 +17,7 @@ public class ClassUtilTest {
|
||||
@Test
|
||||
public void getClassNameTest() {
|
||||
final String className = ClassUtil.getClassName(ClassUtil.class, false);
|
||||
Assertions.assertEquals("reflect.org.dromara.hutool.core.ClassUtil", className);
|
||||
Assertions.assertEquals("org.dromara.hutool.core.reflect.ClassUtil", className);
|
||||
|
||||
final String simpleClassName = ClassUtil.getClassName(ClassUtil.class, true);
|
||||
Assertions.assertEquals("ClassUtil", simpleClassName);
|
||||
@@ -31,9 +31,9 @@ public class ClassUtilTest {
|
||||
|
||||
@Test
|
||||
public void getShortClassNameTest() {
|
||||
final String className = "text.org.dromara.hutool.core.StrUtil";
|
||||
final String className = "org.dromara.hutool.core.text.StrUtil";
|
||||
final String result = ClassUtil.getShortClassName(className);
|
||||
Assertions.assertEquals("c.h.c.t.StrUtil", result);
|
||||
Assertions.assertEquals("o.d.h.c.t.StrUtil", result);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user