mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Add the testFlowableCombineLatest
This commit is contained in:
@@ -699,7 +699,7 @@ public final class RxJavaToReactorTemplates {
|
||||
}
|
||||
|
||||
@SuppressWarnings("IllegalCatch")
|
||||
static <T, U, R>
|
||||
public static <T, U, R>
|
||||
java.util.function.BiFunction<? super T, ? super U, ? extends R> toJdkBiFunction(
|
||||
io.reactivex.functions.BiFunction<? super T, ? super U, ? extends R> biFunction) {
|
||||
return (t, u) -> {
|
||||
|
||||
@@ -30,6 +30,11 @@ final class RxJavaToReactorTemplatesTest implements RefasterTemplateTestCase {
|
||||
return Flux.just(2).as(RxJava2Adapter::fluxToFlowable).as(RxJava2Adapter::flowableToFlux);
|
||||
}
|
||||
|
||||
// XXX: Can this be done with Flowable<Integer> instead of Flowable<Object>
|
||||
Flowable<Integer> testFlowableCombineLatest() {
|
||||
return Flowable.combineLatest(Flowable.just(1), Flowable.just(2), Integer::sum);
|
||||
}
|
||||
|
||||
// XXX: Discuss with Stephan, look at the Publisher which is of type Flowable, that won't work...
|
||||
Flowable<Integer> testFlowableConcatWithPublisher() {
|
||||
return Flowable.just(1).concatWith(Flowable.just(2));
|
||||
|
||||
@@ -27,6 +27,15 @@ final class RxJavaToReactorTemplatesTest implements RefasterTemplateTestCase {
|
||||
return Flux.just(2);
|
||||
}
|
||||
|
||||
// XXX: Can this be done with Flowable<Integer> instead of Flowable<Object>
|
||||
Flowable<Integer> testFlowableCombineLatest() {
|
||||
return RxJava2Adapter.fluxToFlowable(
|
||||
Flux.combineLatest(
|
||||
Flowable.just(1),
|
||||
Flowable.just(2),
|
||||
RxJavaToReactorTemplates.RxJava2ReactorMigrationUtil.toJdkBiFunction(Integer::sum)));
|
||||
}
|
||||
|
||||
// XXX: Discuss with Stephan, look at the Publisher which is of type Flowable, that won't work...
|
||||
Flowable<Integer> testFlowableConcatWithPublisher() {
|
||||
return Flowable.just(1)
|
||||
|
||||
Reference in New Issue
Block a user