use of cyclops.data.tuple.Tuple2 in project cyclops by aol.
the class LazySeqObjectPoolingTest method testZipWithFutures.
@Test
public void testZipWithFutures() {
FutureStream stream = of("a", "b");
FutureStream<Tuple2<Integer, String>> seq = of(1, 2).actOnFutures().zip(stream);
// .map(tuple -> Tuple.tuple(tuple.v1.join(),tuple.v2)).collect(CyclopsCollectors.toList());
List<Tuple2<Integer, String>> result = seq.block();
assertThat(result.size(), is(asList(tuple(1, "a"), tuple(2, "b")).size()));
}
use of cyclops.data.tuple.Tuple2 in project cyclops by aol.
the class LazySequentialSeqObjectPoolsTest method testZipWithFutures.
@Test
public void testZipWithFutures() {
Stream stream = of("a", "b");
List<Tuple2<Integer, String>> result = of(1, 2).actOnFutures().zip(stream).block();
assertThat(result, is(asList(tuple(1, "a"), tuple(2, "b"))));
}
use of cyclops.data.tuple.Tuple2 in project cyclops by aol.
the class LazySequentialSeqTest method testZipWithFutures.
@Test
public void testZipWithFutures() {
Stream stream = of("a", "b");
List<Tuple2<Integer, String>> result = of(1, 2).actOnFutures().zip(stream).block();
assertThat(result, is(asList(tuple(1, "a"), tuple(2, "b"))));
}
use of cyclops.data.tuple.Tuple2 in project cyclops by aol.
the class LazySeqTest method testZipWithFuturesStream.
@Test
public void testZipWithFuturesStream() {
Stream stream = of("a", "b");
FutureStream<Tuple2<Integer, String>> seq = of(1, 2).actOnFutures().zip(stream);
// .map(tuple -> Tuple.tuple(tuple.v1.join(),tuple.v2)).collect(CyclopsCollectors.toList());
List<Tuple2<Integer, String>> result = seq.block();
assertThat(result.size(), is(asList(tuple(1, "a"), tuple(2, "b")).size()));
}
use of cyclops.data.tuple.Tuple2 in project cyclops by aol.
the class LazySeqTest method testZipWithFutures.
@Test
public void testZipWithFutures() {
FutureStream stream = of("a", "b");
FutureStream<Tuple2<Integer, String>> seq = of(1, 2).actOnFutures().zip(stream);
// .map(tuple -> Tuple.tuple(tuple.v1.join(),tuple.v2)).collect(CyclopsCollectors.toList());
List<Tuple2<Integer, String>> result = seq.block();
System.out.println(result);
assertThat(result.size(), is(asList(tuple(1, "a"), tuple(2, "b")).size()));
}
Aggregations