diff --git a/build.gradle b/build.gradle index e4b702d8..49830ae9 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ subprojects { springVersion = "5.2.8.RELEASE" springBootVersion = "2.3.2.RELEASE" jacksonVersion = "2.9.8" - assertJVersion = "3.11.1" + assertJVersion = "3.16.1" } repositories { @@ -38,6 +38,12 @@ subprojects { javadoc { options.encoding = 'UTF-8' } + test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } + } } diff --git a/spring-graphql-boot-starter-webmvc/src/test/java/org/springframework/graphql/IntegrationTest.java b/spring-graphql-boot-starter-webmvc/src/test/java/org/springframework/graphql/IntegrationTest.java index c5a7e498..66d085a9 100644 --- a/spring-graphql-boot-starter-webmvc/src/test/java/org/springframework/graphql/IntegrationTest.java +++ b/spring-graphql-boot-starter-webmvc/src/test/java/org/springframework/graphql/IntegrationTest.java @@ -3,15 +3,15 @@ package org.springframework.graphql; import graphql.ExecutionInput; import graphql.ExecutionResultImpl; import graphql.GraphQL; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.ResponseEntity; -import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.LinkedHashMap; import java.util.Map; @@ -21,7 +21,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -@RunWith(SpringRunner.class) +@ExtendWith(SpringExtension.class) public class IntegrationTest { @Autowired diff --git a/spring-graphql-webmvc/build.gradle b/spring-graphql-webmvc/build.gradle index 2fe0c08a..bb7f9f96 100644 --- a/spring-graphql-webmvc/build.gradle +++ b/spring-graphql-webmvc/build.gradle @@ -10,7 +10,7 @@ dependencies { implementation group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1' testImplementation("org.assertj:assertj-core:$assertJVersion") - testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') testImplementation "org.springframework:spring-test:$springVersion" testImplementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.4.0' testImplementation "org.mockito:mockito-core:2.+"