Bug fixes in WebMvc.fn testing support

See gh-30477
This commit is contained in:
Arjen Poutsma 2024-05-03 14:28:21 +02:00
parent 8bca7cd8e7
commit 92f54da628
1 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ public class RouterFunctionMockMvcBuilder extends AbstractMockMvcBuilder<RouterF
* Atom).
*/
public RouterFunctionMockMvcBuilder setSingleView(View view) {
this.viewResolvers = Collections.<ViewResolver>singletonList(new StaticViewResolver(view));
this.viewResolvers = Collections.singletonList(new StaticViewResolver(view));
return this;
}
@ -226,7 +226,7 @@ public class RouterFunctionMockMvcBuilder extends AbstractMockMvcBuilder<RouterF
ContentNegotiationManager mvcContentNegotiationManager = config.mvcContentNegotiationManager();
wac.addBean("mvcContentNegotiationManager", mvcContentNegotiationManager);
RouterFunctionMapping hm = config.routerFunctionMapping(mvcConversionService, resourceUrlProvider);
RouterFunctionMapping hm = config.getHandlerMapping(mvcConversionService, resourceUrlProvider);
if (sc != null) {
hm.setServletContext(sc);
}