Ensure tests exist

This commit is contained in:
Rob Winch 2020-07-27 17:11:01 -05:00
parent 7a43449b1e
commit 282ba7a2f3
1 changed files with 9 additions and 0 deletions

View File

@ -15,4 +15,13 @@ allprojects {
dependencies {
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:0.0.23-SNAPSHOT"
}
// Ensure every test task has at least a single test
tasks.withType(Test).configureEach {
afterSuite { desc, result ->
if (result.testCount == 0) {
throw new IllegalStateException("No tests were found. Ensure that useJUnitPlatform was used.")
}
}
}
}