blob: 54e1044d276e18bf48289ccd547c82890b0097e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package bjc.utils.funcutils;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import static bjc.utils.funcutils.IteratorUtils.*;
import static bjc.utils.funcutils.TestUtils.assertIteratorEquals;
import static java.util.Arrays.asList;
import static org.junit.Assert.assertEquals;
/**
* Test IteratorUtils functionality.
*
* @author Ben Culkin
*/
public class IteratorUtilsTest {
/**
* Test the chain() method works correctly.
*/
@Test
public void testChain() {
assertIteratorEquals(chain(I(asList("a b", "b c")), (arg) -> I(asList(arg.split(" ")))), "a", "b", "b", "c");
}
}
|