From 6c4aff4c9db88cf9e302a72f0db6b9a167488b73 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 22 Jul 2014 11:01:20 -0400 Subject: [PATCH] Polish --- .../annotation/ViewResolutionIntegrationTests.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java index ddb3fff2b66..d350fc982fc 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java @@ -105,10 +105,9 @@ public class ViewResolutionIntegrationTests { // SPR-12013 @Test - public void viewResolverBeanWithDefaultViewResolutionConfig() throws Exception { - MockHttpServletResponse response = runTest(FreeMarkerBeanBasedWebConfig.class); - assertEquals("Hello World!", - response.getContentAsString()); + public void existingViewResolver() throws Exception { + MockHttpServletResponse response = runTest(ExistingViewResolverConfig.class); + assertEquals("Hello World!", response.getContentAsString()); } @@ -249,8 +248,11 @@ public class ViewResolutionIntegrationTests { } } + /** + * Test @EnableWebMvc in the presence of pre-existing ViewResolver. + */ @Configuration - static class FreeMarkerBeanBasedWebConfig extends AbstractWebConfig { + static class ExistingViewResolverConfig extends AbstractWebConfig { @Bean public FreeMarkerViewResolver freeMarkerViewResolver() {