Migrate to JUnit 5
spring-cloud-function-context spring-cloud-function-context: fix spring-cloud-function-web spring-cloud-function-adapters spring-cloud-function-samples spring-cloud-function-deployer; spring-cloud-function-kotlin Resolves #535
This commit is contained in:
committed by
Oleg Zhurakousky
parent
a6b0d7ef23
commit
8bcfad48fa
@@ -18,8 +18,7 @@ package com.example;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -28,14 +27,12 @@ import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.RequestEntity;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
public class SampleApplicationMvcTests {
|
||||
|
||||
|
||||
@@ -19,9 +19,8 @@ package com.example;
|
||||
import java.net.URI;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
@@ -31,7 +30,6 @@ import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.RequestEntity;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -40,7 +38,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Dave Syer
|
||||
* @author Oleg Zhurakousky
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
public class SampleApplicationTests {
|
||||
|
||||
@@ -51,7 +48,7 @@ public class SampleApplicationTests {
|
||||
|
||||
private TestRestTemplate rest = new TestRestTemplate();
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void before() {
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers.setContentType(MediaType.APPLICATION_JSON);
|
||||
|
||||
Reference in New Issue
Block a user