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 87
87
<jqassistant .plugin.git.version>1.8.0</jqassistant .plugin.git.version>
88
88
<jqassistant .plugin.version>1.9.1</jqassistant .plugin.version>
89
89
<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 >
91
91
<maven-checkstyle-plugin .version>3.1.2</maven-checkstyle-plugin .version>
92
92
<maven-deploy-plugin .version>3.0.0-M1</maven-deploy-plugin .version>
93
93
<maven-enforcer-plugin .version>3.0.0-M3</maven-enforcer-plugin .version>
351
351
</exclusion >
352
352
</exclusions >
353
353
</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 >
354
366
<dependency >
355
367
<groupId >org.testcontainers</groupId >
356
368
<artifactId >neo4j</artifactId >
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import org.springframework.data.neo4j.test.Neo4jIntegrationTest
38
38
import org.springframework.transaction.PlatformTransactionManager
39
39
import org.springframework.transaction.annotation.EnableTransactionManagement
40
40
import org.springframework.transaction.support.TransactionTemplate
41
+ import java.util.function.Consumer
41
42
42
43
/* *
43
44
* @author Michael J. Simons
@@ -204,12 +205,12 @@ class KotlinInheritanceIT @Autowired constructor(
204
205
205
206
val cinemas = cinemaRepository.findAll()
206
207
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)
210
211
.extracting { m -> (m as KotlinAnimationMovie ).studio }
211
212
.isEqualTo(" Pixar" )
212
- }
213
+ })
213
214
}
214
215
215
216
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
39
39
import org.springframework.data.neo4j.test.Neo4jIntegrationTest
40
40
import org.springframework.transaction.PlatformTransactionManager
41
41
import org.springframework.transaction.annotation.EnableTransactionManagement
42
+ import java.util.function.Consumer
42
43
43
44
/* *
44
45
* @author Michael J. Simons
@@ -71,7 +72,9 @@ internal class KotlinProjectionIT {
71
72
assertThat(results)
72
73
.hasSize(1 )
73
74
.first()
74
- .satisfies { personAndDepartment -> projectedEntities(personAndDepartment) }
75
+ .satisfies(Consumer <PersonDepartmentQueryResult > {
76
+ projectedEntities(it)
77
+ })
75
78
}
76
79
77
80
@Test // GH-2349
@@ -83,7 +86,9 @@ internal class KotlinProjectionIT {
83
86
assertThat(results)
84
87
.hasSize(1 )
85
88
.first()
86
- .satisfies { personAndDepartment -> projectedEntities(personAndDepartment) }
89
+ .satisfies(Consumer <PersonDepartmentQueryResult > {
90
+ projectedEntities(it)
91
+ })
87
92
}
88
93
89
94
private fun projectedEntities (personAndDepartment : PersonDepartmentQueryResult ) {
@@ -131,4 +136,4 @@ internal class KotlinProjectionIT {
131
136
return neo4jConnectionSupport.driver
132
137
}
133
138
}
134
- }
139
+ }
You can’t perform that action at this time.
0 commit comments