mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Add Flowable#blockingIterable Refaster template
This commit is contained in:
committed by
Pieter Dirk Soels
parent
e6ea9fd37e
commit
05b6aa03df
@@ -489,6 +489,19 @@ final class RxJavaFlowableToReactorTemplates {
|
||||
// XXX: final Object blockingFirst(Object)
|
||||
// XXX: final void blockingForEach(Consumer)
|
||||
// XXX: final Iterable blockingIterable()
|
||||
|
||||
static final class FlowableBlockingIterable<T> {
|
||||
@BeforeTemplate
|
||||
Iterable<T> before(Flowable<T> flowable) {
|
||||
return flowable.blockingIterable();
|
||||
}
|
||||
|
||||
@AfterTemplate
|
||||
Iterable<T> after(Flowable<T> flowable) {
|
||||
return RxJava2Adapter.flowableToFlux(flowable).toIterable();
|
||||
}
|
||||
}
|
||||
|
||||
// XXX: final Iterable blockingIterable(int)
|
||||
// XXX: final Object blockingLast()
|
||||
// XXX: final Object blockingLast(Object)
|
||||
|
||||
@@ -155,6 +155,10 @@ final class RxJavaFlowableToReactorTemplatesTest implements RefasterTemplateTest
|
||||
return Flowable.just(1).blockingFirst();
|
||||
}
|
||||
|
||||
Iterable<Integer> testFlowableBlockingIterable() {
|
||||
return Flowable.just(1).blockingIterable();
|
||||
}
|
||||
|
||||
Flowable<Integer> testFlowableConcatMap() {
|
||||
return Flowable.just(1).concatMap(e -> Flowable::just);
|
||||
}
|
||||
|
||||
@@ -190,6 +190,10 @@ final class RxJavaFlowableToReactorTemplatesTest implements RefasterTemplateTest
|
||||
return RxJava2Adapter.flowableToFlux(Flowable.just(1)).blockFirst();
|
||||
}
|
||||
|
||||
Iterable<Integer> testFlowableBlockingIterable() {
|
||||
return RxJava2Adapter.flowableToFlux(Flowable.just(1)).toIterable();
|
||||
}
|
||||
|
||||
Flowable<Integer> testFlowableConcatMap() {
|
||||
return RxJava2Adapter.fluxToFlowable(
|
||||
RxJava2Adapter.flowableToFlux(Flowable.just(1))
|
||||
|
||||
Reference in New Issue
Block a user