mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Convert assertThat(x.equals(y)).isFalse() to assertThat(x).isNotEqualTo(y)
Search: assertThat\((?!\s*Arrays\.)(.+?)\.equals\((.+?)\)\)(.*?)\.isFalse\(\) Replace: assertThat($1)$3.isNotEqualTo($2) See gh-36504
This commit is contained in:
+2
-2
@@ -95,7 +95,7 @@ class RefreshableTargetSourceTests {
|
||||
|
||||
Object d = ts.getTarget();
|
||||
assertThat(d).as("D should not be null").isNotNull();
|
||||
assertThat(a.equals(d)).as("A and D should not be equal").isFalse();
|
||||
assertThat(a).as("A and D should not be equal").isNotEqualTo(d);
|
||||
|
||||
Object e = ts.getTarget();
|
||||
assertThat(e).as("D and E should be equal").isEqualTo(d);
|
||||
@@ -103,7 +103,7 @@ class RefreshableTargetSourceTests {
|
||||
Thread.sleep(110);
|
||||
|
||||
Object f = ts.getTarget();
|
||||
assertThat(e.equals(f)).as("E and F should be different").isFalse();
|
||||
assertThat(e).as("E and F should be different").isNotEqualTo(f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user