Skip to content

Commit

Permalink
Format code in test file
Browse files Browse the repository at this point in the history
  • Loading branch information
cernat-catalin committed Aug 16, 2022
1 parent c75bf71 commit 08de097
Showing 1 changed file with 35 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ void identification() {
" Flux.just().collect(ImmutableList::of, (list, item) -> {}).single();",
" // BUG: Diagnostic contains:",
" Flux.just().collect(ImmutableList::of, (list, item) -> {}).defaultIfEmpty(ImmutableList.of());",
" // BUG: Diagnostic contains:",
" Flux.just().collect(ImmutableList::of, (list, item) -> {}).switchIfEmpty(Mono.just(ImmutableList.of()));",
" Flux.just()",
" .collect(ImmutableList::of, (list, item) -> {})",
" // BUG: Diagnostic contains:",
" .switchIfEmpty(Mono.just(ImmutableList.of()));",
"",
" // BUG: Diagnostic contains:",
" Flux.just().collectList().single();",
Expand Down Expand Up @@ -78,10 +80,14 @@ void identification() {
"",
" // BUG: Diagnostic contains:",
" Flux.just().collectMap(identity(), identity(), ImmutableMap::of).single();",
" // BUG: Diagnostic contains:",
" Flux.just().collectMap(identity(), identity(), ImmutableMap::of).defaultIfEmpty(ImmutableMap.of());",
" // BUG: Diagnostic contains:",
" Flux.just().collectMap(identity(), identity(), ImmutableMap::of).switchIfEmpty(Mono.just(ImmutableMap.of()));",
" Flux.just()",
" .collectMap(identity(), identity(), ImmutableMap::of)",
" // BUG: Diagnostic contains:",
" .defaultIfEmpty(ImmutableMap.of());",
" Flux.just()",
" .collectMap(identity(), identity(), ImmutableMap::of)",
" // BUG: Diagnostic contains:",
" .switchIfEmpty(Mono.just(ImmutableMap.of()));",
"",
" // BUG: Diagnostic contains:",
" Flux.just().collectMultimap(identity()).single();",
Expand All @@ -99,10 +105,14 @@ void identification() {
"",
" // BUG: Diagnostic contains:",
" Flux.just().collectMultimap(identity(), identity(), ImmutableMap::of).single();",
" // BUG: Diagnostic contains:",
" Flux.just().collectMultimap(identity(), identity(), ImmutableMap::of).defaultIfEmpty(ImmutableMap.of());",
" // BUG: Diagnostic contains:",
" Flux.just().collectMultimap(identity(), identity(), ImmutableMap::of).switchIfEmpty(Mono.just(ImmutableMap.of()));",
" Flux.just()",
" .collectMultimap(identity(), identity(), ImmutableMap::of)",
" // BUG: Diagnostic contains:",
" .defaultIfEmpty(ImmutableMap.of());",
" Flux.just()",
" .collectMultimap(identity(), identity(), ImmutableMap::of)",
" // BUG: Diagnostic contains:",
" .switchIfEmpty(Mono.just(ImmutableMap.of()));",
" }",
"}",
"")
Expand Down Expand Up @@ -130,7 +140,9 @@ void replacement() {
"",
" Flux.just().collect(ImmutableList::of, (list, item) -> {}).single();",
" Flux.just().collect(ImmutableList::of, (list, item) -> {}).defaultIfEmpty(ImmutableList.of());",
" Flux.just().collect(ImmutableList::of, (list, item) -> {}).switchIfEmpty(Mono.just(ImmutableList.of()));",
" Flux.just()",
" .collect(ImmutableList::of, (list, item) -> {})",
" .switchIfEmpty(Mono.just(ImmutableList.of()));",
"",
" Flux.just().collectList().single();",
" Flux.just().collectList().defaultIfEmpty(ImmutableList.of());",
Expand All @@ -153,8 +165,12 @@ void replacement() {
" Flux.just().collectMap(identity(), identity()).switchIfEmpty(Mono.just(ImmutableMap.of()));",
"",
" Flux.just().collectMap(identity(), identity(), ImmutableMap::of).single();",
" Flux.just().collectMap(identity(), identity(), ImmutableMap::of).defaultIfEmpty(ImmutableMap.of());",
" Flux.just().collectMap(identity(), identity(), ImmutableMap::of).switchIfEmpty(Mono.just(ImmutableMap.of()));",
" Flux.just()",
" .collectMap(identity(), identity(), ImmutableMap::of)",
" .defaultIfEmpty(ImmutableMap.of());",
" Flux.just()",
" .collectMap(identity(), identity(), ImmutableMap::of)",
" .switchIfEmpty(Mono.just(ImmutableMap.of()));",
"",
" Flux.just().collectMultimap(identity()).single();",
" Flux.just().collectMultimap(identity()).defaultIfEmpty(ImmutableMap.of());",
Expand All @@ -165,8 +181,12 @@ void replacement() {
" Flux.just().collectMultimap(identity(), identity()).switchIfEmpty(Mono.just(ImmutableMap.of()));",
"",
" Flux.just().collectMultimap(identity(), identity(), ImmutableMap::of).single();",
" Flux.just().collectMultimap(identity(), identity(), ImmutableMap::of).defaultIfEmpty(ImmutableMap.of());",
" Flux.just().collectMultimap(identity(), identity(), ImmutableMap::of).switchIfEmpty(Mono.just(ImmutableMap.of()));",
" Flux.just()",
" .collectMultimap(identity(), identity(), ImmutableMap::of)",
" .defaultIfEmpty(ImmutableMap.of());",
" Flux.just()",
" .collectMultimap(identity(), identity(), ImmutableMap::of)",
" .switchIfEmpty(Mono.just(ImmutableMap.of()));",
" }",
"}",
"")
Expand All @@ -178,7 +198,6 @@ void replacement() {
"import com.google.common.collect.ImmutableList;",
"import com.google.common.collect.ImmutableMap;",
"import reactor.core.publisher.Flux;",
"import reactor.core.publisher.Mono;",
"",
"class A {",
" void m() {",
Expand Down

0 comments on commit 08de097

Please sign in to comment.