Upgrade tests to Junit5
See gh-14737
This commit is contained in:
@@ -22,8 +22,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import samples.websocket.tomcat.client.GreetingService;
|
||||
import samples.websocket.tomcat.client.SimpleClientWebSocketHandler;
|
||||
import samples.websocket.tomcat.client.SimpleGreetingService;
|
||||
@@ -38,13 +37,11 @@ import org.springframework.boot.web.server.LocalServerPort;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.web.socket.client.WebSocketConnectionManager;
|
||||
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = SampleTomcatWebSocketApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
public class SampleWebSocketsApplicationTests {
|
||||
|
||||
|
||||
@@ -22,8 +22,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import samples.websocket.tomcat.SampleTomcatWebSocketApplication;
|
||||
import samples.websocket.tomcat.client.GreetingService;
|
||||
import samples.websocket.tomcat.client.SimpleClientWebSocketHandler;
|
||||
@@ -42,13 +41,11 @@ import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.web.socket.client.WebSocketConnectionManager;
|
||||
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = { SampleTomcatWebSocketApplication.class,
|
||||
CustomContainerConfiguration.class }, webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
public class CustomContainerWebSocketsApplicationTests {
|
||||
|
||||
@@ -18,7 +18,7 @@ package samples.websocket.tomcat.snake;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
|
||||
Reference in New Issue
Block a user