Skip to content

Commit 7c496d3

Browse files
GH-2267 - Clean up deprecation warnings.
1 parent 7fb990c commit 7c496d3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/test/java/org/springframework/data/neo4j/integration/imperative/RepositoryIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,10 @@ void saveEntityWithRelationshipWithProperties(
13611361
PersonWithRelationshipWithProperties shouldBeDifferentPerson = repository.save(person);
13621362

13631363
// then
1364-
assertThat(shouldBeDifferentPerson).isNotNull().isEqualToComparingOnlyGivenFields(person, "hobbies");
1364+
assertThat(shouldBeDifferentPerson).isNotNull()
1365+
.usingRecursiveComparison()
1366+
.ignoringFieldsMatchingRegexes("^(?:(?!hobbies).)*$")
1367+
.isEqualTo(person);
13651368

13661369
assertThat(shouldBeDifferentPerson.getName()).isEqualToIgnoringCase("Freddie clone");
13671370

src/test/java/org/springframework/data/neo4j/integration/reactive/ReactiveRepositoryIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,10 @@ void saveEntityWithRelationshipWithProperties(
11101110
assertThat(shouldBeDifferentPersons).size().isEqualTo(1);
11111111

11121112
PersonWithRelationshipWithProperties shouldBeDifferentPerson = shouldBeDifferentPersons.get(0);
1113-
assertThat(shouldBeDifferentPerson).isNotNull().isEqualToComparingOnlyGivenFields(person, "hobbies");
1113+
assertThat(shouldBeDifferentPerson).isNotNull()
1114+
.usingRecursiveComparison()
1115+
.ignoringFieldsMatchingRegexes("^(?:(?!hobbies).)*$")
1116+
.isEqualTo(person);
11141117
assertThat(shouldBeDifferentPerson.getName()).isEqualToIgnoringCase("Freddie clone");
11151118

11161119
// check content of db

0 commit comments

Comments
 (0)