mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package cn.hutool.core.convert;
|
package cn.hutool.core.convert;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.lang.TypeReference;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -10,6 +12,7 @@ import java.io.Serializable;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.atomic.AtomicIntegerArray;
|
import java.util.concurrent.atomic.AtomicIntegerArray;
|
||||||
import java.util.concurrent.atomic.AtomicLongArray;
|
import java.util.concurrent.atomic.AtomicLongArray;
|
||||||
|
|
||||||
@@ -261,6 +264,13 @@ public class ConvertTest {
|
|||||||
Assert.assertEquals(1, integer.intValue());
|
Assert.assertEquals(1, integer.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void toSetTest(){
|
||||||
|
final Set<Integer> result = Convert.convert(new TypeReference<Set<Integer>>() {
|
||||||
|
}, "1,2,3");
|
||||||
|
Assert.assertEquals(CollUtil.set(false, 1,2,3), result);
|
||||||
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public enum BuildingType {
|
public enum BuildingType {
|
||||||
PING(1, "平层"),
|
PING(1, "平层"),
|
||||||
|
Reference in New Issue
Block a user