mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix upsert
This commit is contained in:
@@ -4,6 +4,7 @@ import cn.hutool.core.comparator.ComparableComparator;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.junit.Assert;
|
||||
@@ -302,6 +303,14 @@ public class CollUtilTest {
|
||||
Assert.assertEquals(CollUtil.newArrayList("b", "c"), filtered);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void filterSetTest() {
|
||||
Set<String> set = CollUtil.newLinkedHashSet("a", "b", "", " ", "c");
|
||||
Set<String> filtered = CollUtil.filter(set, StrUtil::isNotBlank);
|
||||
|
||||
Assert.assertEquals(CollUtil.newLinkedHashSet("a", "b", "c"), filtered);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void filterRemoveTest() {
|
||||
ArrayList<String> list = CollUtil.newArrayList("a", "b", "c");
|
||||
|
Reference in New Issue
Block a user