use of com.oath.cyclops.ReactiveConvertableSequence in project cyclops by aol.
the class MiscTest method pVectorX.
@Test
public void pVectorX() {
ReactiveSeq<String> seq = Spouts.from(VectorX.of(1, 2, 3, 4).plus(5).map(i -> "connect toNested Akka, RxJava and more with reactiveBuffer-streams" + i));
PersistentSetX<String> setX = seq.to(s -> new LazyReact().fromStream(s)).map(data -> "fan out across threads with futureStreams" + data).to(ReactiveConvertableSequence::converter).persistentSetX();
}
use of com.oath.cyclops.ReactiveConvertableSequence in project cyclops by aol.
the class AbstractAnyMSeqTest method testShuffleRandom.
@Test
public void testShuffleRandom() {
Random r = new Random();
Supplier<AnyMSeq<W, Integer>> s = () -> of(1, 2, 3);
assertEquals(3, s.get().shuffle(r).to(ReactiveConvertableSequence::converter).listX().size());
assertThat(s.get().shuffle(r).to(ReactiveConvertableSequence::converter).listX(), hasItems(1, 2, 3));
}
Aggregations