Start building against Spring Framework 5.3.0 snapshots

See gh-21929
This commit is contained in:
Andy Wilkinson
2020-06-22 18:02:21 +01:00
parent a0946c8923
commit 0d6ea79007
13 changed files with 59 additions and 61 deletions

View File

@@ -28,6 +28,7 @@ import org.springframework.boot.web.codec.CodecCustomizer;
import org.springframework.boot.web.reactive.function.client.WebClientCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.reactive.ClientHttpConnector;
import org.springframework.http.client.reactive.ClientHttpResponse;
@@ -87,6 +88,7 @@ class WebClientAutoConfigurationTests {
void shouldGetPrototypeScopedBean() {
this.contextRunner.withUserConfiguration(WebClientCustomizerConfig.class).run((context) -> {
ClientHttpResponse response = mock(ClientHttpResponse.class);
given(response.getHeaders()).willReturn(new HttpHeaders());
ClientHttpConnector firstConnector = mock(ClientHttpConnector.class);
given(firstConnector.connect(any(), any(), any())).willReturn(Mono.just(response));
WebClient.Builder firstBuilder = context.getBean(WebClient.Builder.class);

View File

@@ -277,8 +277,12 @@ class WebMvcAutoConfigurationTests {
}
@Test
void noLocaleResolver() {
this.contextRunner.run((context) -> assertThat(context).doesNotHaveBean(LocaleResolver.class));
void defaultLocaleResolver() {
this.contextRunner.run((context) -> {
assertThat(context).hasSingleBean(LocaleResolver.class);
LocaleResolver localeResolver = context.getBean(LocaleResolver.class);
assertThat(((AcceptHeaderLocaleResolver) localeResolver).getDefaultLocale()).isNull();
});
}
@Test