Skip to content

Commit

Permalink
StaticImportCheck: Add extra test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Nov 10, 2021
1 parent e1bdb09 commit b2fcc69
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ void replacement() {
"import com.google.common.collect.ImmutableMap;",
"import com.google.common.collect.ImmutableSet;",
"import java.nio.charset.StandardCharsets;",
"import java.util.Objects;",
"import org.junit.jupiter.params.provider.Arguments;",
"import org.springframework.format.annotation.DateTimeFormat;",
"import org.springframework.format.annotation.DateTimeFormat.ISO;",
"",
Expand All @@ -101,6 +103,10 @@ void replacement() {
" Predicates.not(null);",
" not(null);",
"",
" Objects.requireNonNull(\"bar\");",
"",
" Arguments.arguments(\"foo\");",
"",
" Object o = StandardCharsets.UTF_8;",
" }",
"",
Expand All @@ -119,7 +125,9 @@ void replacement() {
"import static com.google.common.collect.ImmutableMap.toImmutableMap;",
"import static com.google.common.collect.ImmutableSet.toImmutableSet;",
"import static java.nio.charset.StandardCharsets.UTF_8;",
"import static java.util.Objects.requireNonNull;",
"import static java.util.function.Predicate.not;",
"import static org.junit.jupiter.params.provider.Arguments.arguments;",
"import static org.springframework.format.annotation.DateTimeFormat.ISO.DATE;",
"import static org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME;",
"import static org.springframework.format.annotation.DateTimeFormat.ISO.TIME;",
Expand All @@ -128,6 +136,8 @@ void replacement() {
"import com.google.common.collect.ImmutableMap;",
"import com.google.common.collect.ImmutableSet;",
"import java.nio.charset.StandardCharsets;",
"import java.util.Objects;",
"import org.junit.jupiter.params.provider.Arguments;",
"import org.springframework.format.annotation.DateTimeFormat;",
"import org.springframework.format.annotation.DateTimeFormat.ISO;",
"",
Expand All @@ -142,6 +152,10 @@ void replacement() {
" Predicates.not(null);",
" not(null);",
"",
" requireNonNull(\"bar\");",
"",
" arguments(\"foo\");",
"",
" Object o = UTF_8;",
" }",
"",
Expand Down

0 comments on commit b2fcc69

Please sign in to comment.