upgrade to junit 5

This commit is contained in:
Andreas Marek
2020-08-09 12:30:51 +10:00
committed by Rossen Stoyanchev
parent 5de1baa794
commit 7829f109f8
3 changed files with 12 additions and 6 deletions

View File

@@ -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"
}
}
}

View File

@@ -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

View File

@@ -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.+"