mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Extend MonoThen Refaster rule (#1556)
This commit is contained in:
@@ -939,7 +939,11 @@ final class ReactorRules {
|
||||
static final class MonoThen<T> {
|
||||
@BeforeTemplate
|
||||
Mono<@Nullable Void> before(Mono<T> mono) {
|
||||
return Refaster.anyOf(mono.ignoreElement().then(), mono.flux().then());
|
||||
return Refaster.anyOf(
|
||||
mono.ignoreElement().then(),
|
||||
mono.flux().then(),
|
||||
Mono.when(mono),
|
||||
Mono.whenDelayError(mono));
|
||||
}
|
||||
|
||||
@AfterTemplate
|
||||
|
||||
@@ -342,7 +342,11 @@ final class ReactorRulesTest implements RefasterRuleCollectionTestCase {
|
||||
}
|
||||
|
||||
ImmutableSet<Mono<Void>> testMonoThen() {
|
||||
return ImmutableSet.of(Mono.just("foo").ignoreElement().then(), Mono.just("bar").flux().then());
|
||||
return ImmutableSet.of(
|
||||
Mono.just("foo").ignoreElement().then(),
|
||||
Mono.just("bar").flux().then(),
|
||||
Mono.when(Mono.just("baz")),
|
||||
Mono.whenDelayError(Mono.just("qux")));
|
||||
}
|
||||
|
||||
ImmutableSet<Mono<Void>> testFluxThen() {
|
||||
|
||||
@@ -340,7 +340,11 @@ final class ReactorRulesTest implements RefasterRuleCollectionTestCase {
|
||||
}
|
||||
|
||||
ImmutableSet<Mono<Void>> testMonoThen() {
|
||||
return ImmutableSet.of(Mono.just("foo").then(), Mono.just("bar").then());
|
||||
return ImmutableSet.of(
|
||||
Mono.just("foo").then(),
|
||||
Mono.just("bar").then(),
|
||||
Mono.just("baz").then(),
|
||||
Mono.just("qux").then());
|
||||
}
|
||||
|
||||
ImmutableSet<Mono<Void>> testFluxThen() {
|
||||
|
||||
Reference in New Issue
Block a user