mirror of
https://gitee.com/dromara/hutool.git
synced 2025-07-30 22:10:27 +08:00
add test
This commit is contained in:
parent
1c43155226
commit
f66a741673
@ -1,5 +1,7 @@
|
||||
package cn.hutool.core.convert;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
@ -10,6 +12,7 @@ import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicIntegerArray;
|
||||
import java.util.concurrent.atomic.AtomicLongArray;
|
||||
|
||||
@ -261,6 +264,13 @@ public class ConvertTest {
|
||||
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
|
||||
public enum BuildingType {
|
||||
PING(1, "平层"),
|
||||
|
Loading…
Reference in New Issue
Block a user