Skip to content

Commit d2de50a

Browse files
GH-2267 - Clean up deprecation warnings.
1 parent 8c297fd commit d2de50a

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

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

+4-1
Original file line numberDiff line numberDiff 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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
import org.springframework.context.annotation.Configuration;
3636
import org.springframework.dao.DataIntegrityViolationException;
3737
import org.springframework.data.neo4j.config.AbstractReactiveNeo4jConfig;
38+
import org.springframework.data.neo4j.core.Neo4jPersistenceExceptionTranslator;
3839
import org.springframework.data.neo4j.core.ReactiveNeo4jClient;
3940
import org.springframework.data.neo4j.integration.shared.common.SimplePerson;
4041
import org.springframework.data.neo4j.repository.ReactiveNeo4jRepository;
4142
import org.springframework.data.neo4j.repository.config.EnableReactiveNeo4jRepositories;
42-
import org.springframework.data.neo4j.repository.support.Neo4jPersistenceExceptionTranslator;
4343
import org.springframework.data.neo4j.repository.support.ReactivePersistenceExceptionTranslationPostProcessor;
4444
import org.springframework.data.neo4j.test.Neo4jExtension;
4545
import org.springframework.data.neo4j.test.Neo4jIntegrationTest;

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

+4-1
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)