guice/gradle/test/junit5.gradle

30 lines
930 B
Groovy
Raw Normal View History

2021-06-03 19:53:05 +02:00
dependencies {
2025-01-01 14:41:57 +01:00
testImplementation testLibs.junit.jupiter.api
testImplementation testLibs.hamcrest
testRuntimeOnly testLibs.junit.jupiter.engine
2021-06-03 19:53:05 +02:00
}
test {
useJUnitPlatform()
2025-01-01 14:41:57 +01:00
doFirst {
jvmArgs = [
'--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED',
'--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED',
'--add-opens=java.base/java.nio=ALL-UNNAMED'
]
}
failFast = true
2021-06-03 19:53:05 +02:00
testLogging {
events 'STARTED', 'PASSED', 'FAILED', 'SKIPPED'
}
afterSuite { desc, result ->
if (!desc.parent) {
println "\nTest result: ${result.resultType}"
println "Test summary: ${result.testCount} tests, " +
"${result.successfulTestCount} succeeded, " +
"${result.failedTestCount} failed, " +
"${result.skippedTestCount} skipped"
}
}
}