BAEL-3597 Cactoos (#8512)
* BAEL-3597 Cactoos * BAEL-3597 Cactoos * BAEL-3597 Cactoos * BAEL-3597 Cactoos
This commit is contained in:
committed by
maibin
parent
210e4b05d0
commit
f83994f516
@@ -0,0 +1,35 @@
|
||||
package com.baeldung.cactoos;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class CactoosCollectionUtilsUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenFilteredClassIsCalledWithSpecificArgs_thenCorrespondingFilteredCollectionShouldBeReturned() throws IOException {
|
||||
|
||||
CactoosCollectionUtils obj = new CactoosCollectionUtils();
|
||||
|
||||
// when
|
||||
List<String> strings = new ArrayList<String>() {
|
||||
{
|
||||
add("Hello");
|
||||
add("John");
|
||||
add("Smith");
|
||||
add("Eric");
|
||||
add("Dizzy");
|
||||
}
|
||||
};
|
||||
int size = obj.getFilteredList(strings).size();
|
||||
|
||||
// then
|
||||
assertEquals(3, size);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user