Browse Source

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.
pull/16279/head
Brian Clozel 7 years ago
parent
commit
711169aa8a
  1. 4
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java

4
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java

@ -137,7 +137,7 @@ public class WebMvcAutoConfigurationTests { @@ -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 { @@ -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

Loading…
Cancel
Save