Broadly remove deprecated core classes and methods
Issue: SPR-14430
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -54,7 +54,7 @@ public class WebMvcStompEndpointRegistryTests {
|
||||
|
||||
WebSocketTransportRegistration transport = new WebSocketTransportRegistration();
|
||||
TaskScheduler scheduler = mock(TaskScheduler.class);
|
||||
this.endpointRegistry = new WebMvcStompEndpointRegistry(this.webSocketHandler, transport, null, scheduler);
|
||||
this.endpointRegistry = new WebMvcStompEndpointRegistry(this.webSocketHandler, transport, scheduler);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -78,7 +78,6 @@ public class XhrTransportTests {
|
||||
transport.executeSendRequest(url, null, new TextMessage("payload"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void connect() throws Exception {
|
||||
HttpHeaders handshakeHeaders = new HttpHeaders();
|
||||
@@ -88,12 +87,7 @@ public class XhrTransportTests {
|
||||
given(request.getSockJsUrlInfo()).willReturn(new SockJsUrlInfo(new URI("http://example.com")));
|
||||
given(request.getHandshakeHeaders()).willReturn(handshakeHeaders);
|
||||
|
||||
HttpHeaders requestHeaders = new HttpHeaders();
|
||||
requestHeaders.set("foo", "bar");
|
||||
|
||||
TestXhrTransport transport = new TestXhrTransport();
|
||||
transport.setRequestHeaders(requestHeaders);
|
||||
|
||||
WebSocketHandler handler = mock(WebSocketHandler.class);
|
||||
transport.connect(request, handler);
|
||||
|
||||
@@ -105,9 +99,8 @@ public class XhrTransportTests {
|
||||
verify(request).getHttpRequestHeaders();
|
||||
verifyNoMoreInteractions(request);
|
||||
|
||||
assertEquals(2, transport.actualHandshakeHeaders.size());
|
||||
assertEquals(1, transport.actualHandshakeHeaders.size());
|
||||
assertEquals("foo", transport.actualHandshakeHeaders.getOrigin());
|
||||
assertEquals("bar", transport.actualHandshakeHeaders.getFirst("foo"));
|
||||
|
||||
assertFalse(transport.actualSession.isDisconnected());
|
||||
captor.getValue().run();
|
||||
|
||||
Reference in New Issue
Block a user