use of org.cactoos.iterable.Mapped in project cactoos by yegor256.
the class ListOfTest method makesListFromMappedIterable.
@Test
public void makesListFromMappedIterable() throws Exception {
final List<Integer> list = new ListOf<>(new Mapped<Integer>(i -> i + 1, new IterableOf<>(1, -1, 0, 1)));
MatcherAssert.assertThat("Can't turn a mapped iterable into a list", list, new HasSize(4));
MatcherAssert.assertThat("Can't turn a mapped iterable into a list, again", list, new HasSize(4));
}
Aggregations