|
24 | 24 | import java.util.Map;
|
25 | 25 |
|
26 | 26 | import org.hamcrest.Matchers;
|
27 |
| -import org.junit.Before; |
28 | 27 | import org.junit.Test;
|
29 | 28 |
|
30 | 29 | import org.springframework.beans.DirectFieldAccessor;
|
|
99 | 98 | */
|
100 | 99 | public class MessageBrokerBeanDefinitionParserTests {
|
101 | 100 |
|
102 |
| - private GenericWebApplicationContext appContext; |
103 |
| - |
104 |
| - |
105 |
| - @Before |
106 |
| - public void setup() { |
107 |
| - this.appContext = new GenericWebApplicationContext(); |
108 |
| - } |
| 101 | + private final GenericWebApplicationContext appContext = new GenericWebApplicationContext(); |
109 | 102 |
|
110 | 103 |
|
111 | 104 | @Test
|
@@ -231,7 +224,7 @@ public void simpleBroker() throws Exception {
|
231 | 224 | assertNotNull(this.appContext.getBean("webSocketScopeConfigurer", CustomScopeConfigurer.class));
|
232 | 225 |
|
233 | 226 | DirectFieldAccessor subscriptionRegistryAccessor = new DirectFieldAccessor(brokerMessageHandler.getSubscriptionRegistry());
|
234 |
| - String pathSeparator = (String)new DirectFieldAccessor(subscriptionRegistryAccessor.getPropertyValue("pathMatcher")).getPropertyValue("pathSeparator"); |
| 227 | + String pathSeparator = (String) new DirectFieldAccessor(subscriptionRegistryAccessor.getPropertyValue("pathMatcher")).getPropertyValue("pathSeparator"); |
235 | 228 | assertEquals(".", pathSeparator);
|
236 | 229 | }
|
237 | 230 |
|
@@ -355,7 +348,7 @@ public void annotationMethodMessageHandler() {
|
355 | 348 | assertEquals(MimeTypeUtils.APPLICATION_JSON, ((DefaultContentTypeResolver) resolver).getDefaultMimeType());
|
356 | 349 |
|
357 | 350 | DirectFieldAccessor handlerAccessor = new DirectFieldAccessor(annotationMethodMessageHandler);
|
358 |
| - String pathSeparator = (String)new DirectFieldAccessor(handlerAccessor.getPropertyValue("pathMatcher")).getPropertyValue("pathSeparator"); |
| 351 | + String pathSeparator = (String) new DirectFieldAccessor(handlerAccessor.getPropertyValue("pathMatcher")).getPropertyValue("pathSeparator"); |
359 | 352 | assertEquals(".", pathSeparator);
|
360 | 353 | }
|
361 | 354 |
|
|
0 commit comments