Replace assertThat(x instanceof y).isTrue() with assertThat(x).isInstanceOf(y.class)
Search for : assertThat\((.+) instanceof (\w+)\)\.isTrue\(\) Replace with : assertThat($1).isInstanceOf($2.class) Search for : assertThat\((.+) instanceof (\w+)\)\.isFalse\(\) Replace with : assertThat($1).isNotInstanceOf($2.class) Closes gh-31760
This commit is contained in:
committed by
Brian Clozel
parent
59815cefce
commit
66e405525b
@@ -199,8 +199,8 @@ public class AnnotationDrivenBeanDefinitionParserTests {
|
||||
assertThat(value).isNotNull();
|
||||
assertThat(value).isInstanceOf(List.class);
|
||||
List<ResponseBodyAdvice<?>> converters = (List<ResponseBodyAdvice<?>>) value;
|
||||
assertThat(converters.get(0) instanceof JsonViewRequestBodyAdvice).isTrue();
|
||||
assertThat(converters.get(1) instanceof JsonViewResponseBodyAdvice).isTrue();
|
||||
assertThat(converters).element(0).isInstanceOf(JsonViewRequestBodyAdvice.class);
|
||||
assertThat(converters).element(1).isInstanceOf(JsonViewResponseBodyAdvice.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user