mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
package cn.hutool.core.convert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.hutool.core.lang.Console;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类型转换工具单元测试
|
||||
|
@@ -42,8 +42,8 @@ public class ConvertToBeanTest {
|
||||
person.setSubName("sub名字");
|
||||
|
||||
Map<String, String> map = Convert.toMap(String.class, String.class, person);
|
||||
Assert.assertEquals(map.get("name"), "测试A11");
|
||||
Assert.assertEquals(map.get("age"), 14);
|
||||
Assert.assertEquals("测试A11", map.get("name"));
|
||||
Assert.assertEquals("14", map.get("age"));
|
||||
Assert.assertEquals("11213232", map.get("openid"));
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,6 @@ import cn.hutool.core.date.BetweenFormater.Level;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
|
@@ -1,13 +1,11 @@
|
||||
package cn.hutool.core.util;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import cn.hutool.core.lang.Console;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import cn.hutool.core.lang.Editor;
|
||||
import cn.hutool.core.lang.Filter;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* {@link ArrayUtil} 数组工具单元测试
|
||||
|
@@ -52,10 +52,10 @@ public class EnumUtilTest {
|
||||
Assert.assertEquals("type1", enumMap.get("TEST1"));
|
||||
}
|
||||
|
||||
public static enum TestEnum{
|
||||
public enum TestEnum{
|
||||
TEST1("type1"), TEST2("type2"), TEST3("type3");
|
||||
|
||||
private TestEnum(String type) {
|
||||
TestEnum(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user