mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add method
This commit is contained in:
@@ -11,6 +11,7 @@ import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
@@ -694,4 +695,14 @@ public class CollUtilTest {
|
||||
|
||||
Assert.assertEquals(0, CollUtil.page(3, 5, objects).size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void subtractToListTest(){
|
||||
List<Long> list1 = Arrays.asList(1L, 2L, 3L);
|
||||
List<Long> list2 = Arrays.asList(2L, 3L);
|
||||
|
||||
List<Long> result = CollUtil.subtractToList(list1, list2);
|
||||
Assert.assertEquals(1, result.size());
|
||||
Assert.assertEquals(1L, result.get(0), 1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user