Sort members

This commit is contained in:
Gary Gregory 2024-04-19 09:11:49 -04:00
parent b19c82a7ce
commit 67336ab252
1 changed files with 8 additions and 8 deletions

View File

@ -136,6 +136,14 @@ public class StreamsTest extends AbstractLangTest {
assertEquals(2, Streams.instancesOf(String.class, objects).collect(Collectors.toList()).size());
}
@Test
public void testNonNull() {
assertEquals(0, Streams.nonNull().collect(Collectors.toList()).size());
assertEquals(1, Streams.nonNull("A").collect(Collectors.toList()).size());
assertEquals(1, Streams.nonNull("A", null).collect(Collectors.toList()).size());
assertEquals(1, Streams.nonNull(null, "A").collect(Collectors.toList()).size());
}
@Test
public void testNullSafeStreamNotNull() {
assertEquals(2, Streams.nonNull(Arrays.asList("A", "B")).collect(Collectors.toList()).size());
@ -203,14 +211,6 @@ public class StreamsTest extends AbstractLangTest {
assertEquals(0, Streams.of(input).collect(Collectors.toList()).size());
}
@Test
public void testNonNull() {
assertEquals(0, Streams.nonNull().collect(Collectors.toList()).size());
assertEquals(1, Streams.nonNull("A").collect(Collectors.toList()).size());
assertEquals(1, Streams.nonNull("A", null).collect(Collectors.toList()).size());
assertEquals(1, Streams.nonNull(null, "A").collect(Collectors.toList()).size());
}
@Test
public void testSimpleStreamFilter() {
final List<String> input = Arrays.asList("1", "2", "3", "4", "5", "6");