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.
This commit is contained in:
Brian Clozel
2019-03-21 14:31:38 +01:00
parent 6e9e5e5a8b
commit 711169aa8a

View File

@@ -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