File tree Expand file tree Collapse file tree 3 files changed +26
-8
lines changed
src/test/kotlin/org/springframework/data/neo4j/integration/imperative Expand file tree Collapse file tree 3 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 8787 <jqassistant .plugin.git.version>1.8.0</jqassistant .plugin.git.version>
8888 <jqassistant .plugin.version>1.9.1</jqassistant .plugin.version>
8989 <jqassistant .version>1.9.1</jqassistant .version>
90- <junit-cc-testcontainer >2020 .0.7 </junit-cc-testcontainer >
90+ <junit-cc-testcontainer >2021 .0.1 </junit-cc-testcontainer >
9191 <maven-checkstyle-plugin .version>3.1.2</maven-checkstyle-plugin .version>
9292 <maven-deploy-plugin .version>3.0.0-M1</maven-deploy-plugin .version>
9393 <maven-enforcer-plugin .version>3.0.0-M3</maven-enforcer-plugin .version>
351351 </exclusion >
352352 </exclusions >
353353 </dependency >
354+ <dependency >
355+ <groupId >org.testcontainers</groupId >
356+ <artifactId >testcontainers</artifactId >
357+ <scope >test</scope >
358+ <!-- Exclusion because there is a Spring Data parent dependency to a newer JUnit version -->
359+ <exclusions >
360+ <exclusion >
361+ <groupId >junit</groupId >
362+ <artifactId >junit</artifactId >
363+ </exclusion >
364+ </exclusions >
365+ </dependency >
354366 <dependency >
355367 <groupId >org.testcontainers</groupId >
356368 <artifactId >neo4j</artifactId >
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import org.springframework.data.neo4j.test.Neo4jIntegrationTest
3838import org.springframework.transaction.PlatformTransactionManager
3939import org.springframework.transaction.annotation.EnableTransactionManagement
4040import org.springframework.transaction.support.TransactionTemplate
41+ import java.util.function.Consumer
4142
4243/* *
4344 * @author Michael J. Simons
@@ -204,12 +205,12 @@ class KotlinInheritanceIT @Autowired constructor(
204205
205206 val cinemas = cinemaRepository.findAll()
206207 assertThat(cinemas).hasSize(1 );
207- assertThat(cinemas).first().satisfies { c ->
208- assertThat(c .plays).hasSize(1 );
209- assertThat(c .plays).first().isInstanceOf(KotlinAnimationMovie ::class .java)
208+ assertThat(cinemas).first().satisfies( Consumer < KotlinCinema > {
209+ assertThat(it .plays).hasSize(1 );
210+ assertThat(it .plays).first().isInstanceOf(KotlinAnimationMovie ::class .java)
210211 .extracting { m -> (m as KotlinAnimationMovie ).studio }
211212 .isEqualTo(" Pixar" )
212- }
213+ })
213214 }
214215
215216 interface KotlinCinemaRepository : Neo4jRepository <KotlinCinema , String >
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import org.springframework.data.neo4j.test.Neo4jExtension.Neo4jConnectionSupport
3939import org.springframework.data.neo4j.test.Neo4jIntegrationTest
4040import org.springframework.transaction.PlatformTransactionManager
4141import org.springframework.transaction.annotation.EnableTransactionManagement
42+ import java.util.function.Consumer
4243
4344/* *
4445 * @author Michael J. Simons
@@ -71,7 +72,9 @@ internal class KotlinProjectionIT {
7172 assertThat(results)
7273 .hasSize(1 )
7374 .first()
74- .satisfies { personAndDepartment -> projectedEntities(personAndDepartment) }
75+ .satisfies(Consumer <PersonDepartmentQueryResult > {
76+ projectedEntities(it)
77+ })
7578 }
7679
7780 @Test // GH-2349
@@ -83,7 +86,9 @@ internal class KotlinProjectionIT {
8386 assertThat(results)
8487 .hasSize(1 )
8588 .first()
86- .satisfies { personAndDepartment -> projectedEntities(personAndDepartment) }
89+ .satisfies(Consumer <PersonDepartmentQueryResult > {
90+ projectedEntities(it)
91+ })
8792 }
8893
8994 private fun projectedEntities (personAndDepartment : PersonDepartmentQueryResult ) {
@@ -131,4 +136,4 @@ internal class KotlinProjectionIT {
131136 return neo4jConnectionSupport.driver
132137 }
133138 }
134- }
139+ }
You can’t perform that action at this time.
0 commit comments