Replace use of AbstractWebSocketMessageBrokerConfigurer

This commit is contained in:
Rossen Stoyanchev
2018-01-15 10:01:14 -05:00
parent d6591a6329
commit dd09c08cdf
6 changed files with 24 additions and 21 deletions

View File

@@ -16,9 +16,6 @@
package org.springframework.web.socket.config.annotation;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -64,6 +61,13 @@ import org.springframework.web.socket.messaging.SubProtocolHandler;
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
/**
* Test fixture for
* {@link org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport}.
@@ -219,7 +223,7 @@ public class WebSocketMessageBrokerConfigurationSupportTests {
}
@Configuration
static class TestConfigurer extends AbstractWebSocketMessageBrokerConfigurer {
static class TestConfigurer implements WebSocketMessageBrokerConfigurer {
@Bean
public TestController subscriptionController() {

View File

@@ -51,14 +51,14 @@ import org.springframework.web.socket.UndertowTestServer;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.client.jetty.JettyWebSocketClient;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.handler.TextWebSocketHandler;
import org.springframework.web.socket.server.HandshakeHandler;
import static org.junit.Assert.*;
import static org.springframework.web.socket.messaging.StompTextMessageBuilder.*;
import static org.junit.Assert.assertTrue;
import static org.springframework.web.socket.messaging.StompTextMessageBuilder.create;
/**
* Integration tests with annotated message-handling methods.
@@ -318,7 +318,7 @@ public class StompWebSocketIntegrationTests extends AbstractWebSocketIntegration
basePackageClasses=StompWebSocketIntegrationTests.class,
useDefaultFilters=false,
includeFilters=@ComponentScan.Filter(IntegrationTestController.class))
static class TestMessageBrokerConfigurer extends AbstractWebSocketMessageBrokerConfigurer {
static class TestMessageBrokerConfigurer implements WebSocketMessageBrokerConfigurer {
@Autowired
private HandshakeHandler handshakeHandler; // can't rely on classpath for server detection