Browse Source

Polishing

pull/932/head
Juergen Hoeller 9 years ago
parent
commit
9973694ed2
  1. 2
      spring-websocket/src/test/java/org/springframework/web/socket/config/HandlersBeanDefinitionParserTests.java
  2. 13
      spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java

2
spring-websocket/src/test/java/org/springframework/web/socket/config/HandlersBeanDefinitionParserTests.java

@ -74,7 +74,7 @@ import static org.junit.Assert.*; @@ -74,7 +74,7 @@ import static org.junit.Assert.*;
*/
public class HandlersBeanDefinitionParserTests {
private GenericWebApplicationContext appContext = new GenericWebApplicationContext();
private final GenericWebApplicationContext appContext = new GenericWebApplicationContext();
@Test

13
spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java

@ -24,7 +24,6 @@ import java.util.List; @@ -24,7 +24,6 @@ import java.util.List;
import java.util.Map;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.DirectFieldAccessor;
@ -99,13 +98,7 @@ import static org.junit.Assert.*; @@ -99,13 +98,7 @@ import static org.junit.Assert.*;
*/
public class MessageBrokerBeanDefinitionParserTests {
private GenericWebApplicationContext appContext;
@Before
public void setup() {
this.appContext = new GenericWebApplicationContext();
}
private final GenericWebApplicationContext appContext = new GenericWebApplicationContext();
@Test
@ -231,7 +224,7 @@ public class MessageBrokerBeanDefinitionParserTests { @@ -231,7 +224,7 @@ public class MessageBrokerBeanDefinitionParserTests {
assertNotNull(this.appContext.getBean("webSocketScopeConfigurer", CustomScopeConfigurer.class));
DirectFieldAccessor subscriptionRegistryAccessor = new DirectFieldAccessor(brokerMessageHandler.getSubscriptionRegistry());
String pathSeparator = (String)new DirectFieldAccessor(subscriptionRegistryAccessor.getPropertyValue("pathMatcher")).getPropertyValue("pathSeparator");
String pathSeparator = (String) new DirectFieldAccessor(subscriptionRegistryAccessor.getPropertyValue("pathMatcher")).getPropertyValue("pathSeparator");
assertEquals(".", pathSeparator);
}
@ -355,7 +348,7 @@ public class MessageBrokerBeanDefinitionParserTests { @@ -355,7 +348,7 @@ public class MessageBrokerBeanDefinitionParserTests {
assertEquals(MimeTypeUtils.APPLICATION_JSON, ((DefaultContentTypeResolver) resolver).getDefaultMimeType());
DirectFieldAccessor handlerAccessor = new DirectFieldAccessor(annotationMethodMessageHandler);
String pathSeparator = (String)new DirectFieldAccessor(handlerAccessor.getPropertyValue("pathMatcher")).getPropertyValue("pathSeparator");
String pathSeparator = (String) new DirectFieldAccessor(handlerAccessor.getPropertyValue("pathMatcher")).getPropertyValue("pathSeparator");
assertEquals(".", pathSeparator);
}

Loading…
Cancel
Save