Polishing
This commit is contained in:
@@ -83,7 +83,7 @@ public class StandardWebSocketClientTests {
|
||||
assertEquals(443, session.getLocalAddress().getPort());
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testGetLocalAddressNoScheme() throws Exception {
|
||||
URI uri = new URI("localhost/abc");
|
||||
this.wsClient.doHandshake(this.wsHandler, this.headers, uri);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class BeanCreatingHandlerProviderTests {
|
||||
assertNotNull(provider.getHandler());
|
||||
}
|
||||
|
||||
@Test(expected=BeanInstantiationException.class)
|
||||
@Test(expected = BeanInstantiationException.class)
|
||||
public void getHandlerNoBeanFactory() {
|
||||
|
||||
BeanCreatingHandlerProvider<EchoHandler> provider =
|
||||
|
||||
@@ -91,7 +91,7 @@ public class SubProtocolWebSocketHandlerTests {
|
||||
isA(ConcurrentWebSocketSessionDecorator.class), eq(this.inClientChannel));
|
||||
}
|
||||
|
||||
@Test(expected=IllegalStateException.class)
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void subProtocolNoMatch() throws Exception {
|
||||
this.webSocketHandler.setDefaultProtocolHandler(defaultHandler);
|
||||
this.webSocketHandler.setProtocolHandlers(Arrays.asList(stompHandler, mqttHandler));
|
||||
@@ -132,13 +132,13 @@ public class SubProtocolWebSocketHandlerTests {
|
||||
isA(ConcurrentWebSocketSessionDecorator.class), eq(this.inClientChannel));
|
||||
}
|
||||
|
||||
@Test(expected=IllegalStateException.class)
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void noSubProtocolTwoHandlers() throws Exception {
|
||||
this.webSocketHandler.setProtocolHandlers(Arrays.asList(stompHandler, mqttHandler));
|
||||
this.webSocketHandler.afterConnectionEstablished(session);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalStateException.class)
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void noSubProtocolNoDefaultHandler() throws Exception {
|
||||
this.webSocketHandler.setProtocolHandlers(Arrays.asList(stompHandler, mqttHandler));
|
||||
this.webSocketHandler.afterConnectionEstablished(session);
|
||||
|
||||
@@ -84,7 +84,7 @@ public class HttpReceivingTransportHandlerTests extends AbstractHttpRequestTests
|
||||
handleRequestAndExpectFailure();
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void readMessagesNoSession() throws Exception {
|
||||
WebSocketHandler webSocketHandler = mock(WebSocketHandler.class);
|
||||
new XhrReceivingTransportHandler().handleRequest(this.request, this.response, webSocketHandler, null);
|
||||
|
||||
Reference in New Issue
Block a user