Clarify Junit 5 test imports

Fix #14
This commit is contained in:
Sebastien Deleuze
2019-01-21 15:25:04 +01:00
parent 1386ad1de3
commit 21e19c2e02
5 changed files with 4 additions and 15 deletions

View File

@@ -270,12 +270,14 @@ dependencies {
}
----
Refresh Gradle configuration, and open `BlogApplicationTests` to replace `@RunWith(SpringRunner::class)` by `@ExtendWith(SpringExtension::class)`.
Refresh Gradle configuration, open `BlogApplicationTests` and update imports as bellow and remove `@RunWith(SpringRunner::class)` since `@SpringBootTest` is already annotated with JUnit 5 `@ExtendWith(SpringExtension::class)` as of Spring Boot 2.1.
`src/test/kotlin/blog/BlogApplicationTests.kt`
[source,kotlin]
----
@ExtendWith(SpringExtension::class)
import org.junit.jupiter.api.Test
import org.springframework.boot.test.context.SpringBootTest
@SpringBootTest
class BlogApplicationTests {