File tree 2 files changed +8
-2
lines changed
src/test/java/org/springframework/data/neo4j/integration 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1361,7 +1361,10 @@ void saveEntityWithRelationshipWithProperties(
1361
1361
PersonWithRelationshipWithProperties shouldBeDifferentPerson = repository .save (person );
1362
1362
1363
1363
// then
1364
- assertThat (shouldBeDifferentPerson ).isNotNull ().isEqualToComparingOnlyGivenFields (person , "hobbies" );
1364
+ assertThat (shouldBeDifferentPerson ).isNotNull ()
1365
+ .usingRecursiveComparison ()
1366
+ .ignoringFieldsMatchingRegexes ("^(?:(?!hobbies).)*$" )
1367
+ .isEqualTo (person );
1365
1368
1366
1369
assertThat (shouldBeDifferentPerson .getName ()).isEqualToIgnoringCase ("Freddie clone" );
1367
1370
Original file line number Diff line number Diff line change @@ -1110,7 +1110,10 @@ void saveEntityWithRelationshipWithProperties(
1110
1110
assertThat (shouldBeDifferentPersons ).size ().isEqualTo (1 );
1111
1111
1112
1112
PersonWithRelationshipWithProperties shouldBeDifferentPerson = shouldBeDifferentPersons .get (0 );
1113
- assertThat (shouldBeDifferentPerson ).isNotNull ().isEqualToComparingOnlyGivenFields (person , "hobbies" );
1113
+ assertThat (shouldBeDifferentPerson ).isNotNull ()
1114
+ .usingRecursiveComparison ()
1115
+ .ignoringFieldsMatchingRegexes ("^(?:(?!hobbies).)*$" )
1116
+ .isEqualTo (person );
1114
1117
assertThat (shouldBeDifferentPerson .getName ()).isEqualToIgnoringCase ("Freddie clone" );
1115
1118
1116
1119
// check content of db
You can’t perform that action at this time.
0 commit comments