File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
src/test/java/org/springframework/data/neo4j/integration Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1450,7 +1450,10 @@ void saveEntityWithRelationshipWithProperties(
14501450 PersonWithRelationshipWithProperties shouldBeDifferentPerson = repository .save (person );
14511451
14521452 // then
1453- assertThat (shouldBeDifferentPerson ).isNotNull ().isEqualToComparingOnlyGivenFields (person , "hobbies" );
1453+ assertThat (shouldBeDifferentPerson ).isNotNull ()
1454+ .usingRecursiveComparison ()
1455+ .ignoringFieldsMatchingRegexes ("^(?:(?!hobbies).)*$" )
1456+ .isEqualTo (person );
14541457
14551458 assertThat (shouldBeDifferentPerson .getName ()).isEqualToIgnoringCase ("Freddie clone" );
14561459
Original file line number Diff line number Diff line change 3535import org .springframework .context .annotation .Configuration ;
3636import org .springframework .dao .DataIntegrityViolationException ;
3737import org .springframework .data .neo4j .config .AbstractReactiveNeo4jConfig ;
38+ import org .springframework .data .neo4j .core .Neo4jPersistenceExceptionTranslator ;
3839import org .springframework .data .neo4j .core .ReactiveNeo4jClient ;
3940import org .springframework .data .neo4j .integration .shared .common .SimplePerson ;
4041import org .springframework .data .neo4j .repository .ReactiveNeo4jRepository ;
4142import org .springframework .data .neo4j .repository .config .EnableReactiveNeo4jRepositories ;
42- import org .springframework .data .neo4j .repository .support .Neo4jPersistenceExceptionTranslator ;
4343import org .springframework .data .neo4j .repository .support .ReactivePersistenceExceptionTranslationPostProcessor ;
4444import org .springframework .data .neo4j .test .Neo4jExtension ;
4545import org .springframework .data .neo4j .test .Neo4jIntegrationTest ;
Original file line number Diff line number Diff line change @@ -1184,7 +1184,10 @@ void saveEntityWithRelationshipWithProperties(
11841184 assertThat (shouldBeDifferentPersons ).size ().isEqualTo (1 );
11851185
11861186 PersonWithRelationshipWithProperties shouldBeDifferentPerson = shouldBeDifferentPersons .get (0 );
1187- assertThat (shouldBeDifferentPerson ).isNotNull ().isEqualToComparingOnlyGivenFields (person , "hobbies" );
1187+ assertThat (shouldBeDifferentPerson ).isNotNull ()
1188+ .usingRecursiveComparison ()
1189+ .ignoringFieldsMatchingRegexes ("^(?:(?!hobbies).)*$" )
1190+ .isEqualTo (person );
11881191 assertThat (shouldBeDifferentPerson .getName ()).isEqualToIgnoringCase ("Freddie clone" );
11891192
11901193 // check content of db
You can’t perform that action at this time.
0 commit comments