Permalink
Browse files

enable JUnit 5 support

  • Loading branch information...
fabricio-lemos
fabricio-lemos committed Jun 25, 2018
1 parent a81be36 commit 8885f82ad43934d22d9573ebb99df4b7a078fe45
Showing with 29 additions and 4 deletions.
  1. +25 −0 pom.xml
  2. +4 −4 src/test/kotlin/com/example/blog/BlogApplicationTests.kt
View
25 pom.xml
@@ -23,6 +23,8 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<kotlin.version>1.2.41</kotlin.version>
<junit.jupiter.version>5.2.0</junit.jupiter.version>
<junit.platform.version>1.2.0</junit.platform.version>
</properties>
<dependencies>
@@ -56,6 +58,18 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -86,6 +100,17 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit.platform.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
@@ -1,11 +1,11 @@
package com.example.blog
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
import org.springframework.test.context.junit.jupiter.SpringExtension
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@SpringBootTest
class BlogApplicationTests {

0 comments on commit 8885f82

Please sign in to comment.