@Test public void consumerTransformerShouldPropagateCompletion() throws Exception { AssertableSubscriber<Object> subscriber = upstream.compose(Transformers.fromConsumer(consumer, scheduler)).test(); upstream.onNext("hi"); upstream.onCompleted(); scheduler.triggerActions(); subscriber.awaitTerminalEvent(1, TimeUnit.SECONDS); subscriber.assertCompleted(); }
static <F, E> Transformer<F, E> fromConsumer(final Action1<F> doEffect) { return fromConsumer(doEffect, null); }
Transformers { static <F, E> Transformer<F, E> fromConsumer(final Action1<F> doEffect) { return fromConsumer(doEffect, null); } }
Transformers { static <F, E> Transformer<F, E> fromConsumer(final Action1<F> doEffect) { return fromConsumer(doEffect, null); } private  Transformers(); }
Transformers { static <F, E> Transformer<F, E> fromConsumer(final Action1<F> doEffect) { return fromConsumer(doEffect, null); } private  Transformers();  }
Transformers { static <F, E> Transformer<F, E> fromConsumer(final Action1<F> doEffect) { return fromConsumer(doEffect, null); } private  Transformers();   }