From 711169aa8ae4b8ff0e349cd2fb495ffd1db9c3b6 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Thu, 21 Mar 2019 14:31:38 +0100 Subject: [PATCH] Adapt tests after Servlet.fn added to Spring Framework Since Servlet.fn support has been added in Spring Framework, new infrastructure beans (like `HandlerAdapter` and `HandlerMapping`) have been added. This commit adapts the Spring MVC auto-configuration tests to reflect those changes. --- .../web/servlet/WebMvcAutoConfigurationTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java index 17d74b17795..4fd5f8a87f0 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java @@ -137,7 +137,7 @@ public class WebMvcAutoConfigurationTests { @Test public void handlerAdaptersCreated() { this.contextRunner.run((context) -> { - assertThat(context).getBeans(HandlerAdapter.class).hasSize(3); + assertThat(context).getBeans(HandlerAdapter.class).hasSize(4); assertThat(context.getBean(RequestMappingHandlerAdapter.class) .getMessageConverters()).isNotEmpty().isEqualTo( context.getBean(HttpMessageConverters.class).getConverters()); @@ -147,7 +147,7 @@ public class WebMvcAutoConfigurationTests { @Test public void handlerMappingsCreated() { this.contextRunner.run((context) -> assertThat(context) - .getBeans(HandlerMapping.class).hasSize(5)); + .getBeans(HandlerMapping.class).hasSize(6)); } @Test