Skip to content

Commit

Permalink
Bug fixes in WebMvc.fn testing support
Browse files Browse the repository at this point in the history
  • Loading branch information
poutsma committed May 3, 2024
1 parent 8bca7cd commit 92f54da
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public RouterFunctionMockMvcBuilder setViewResolvers(ViewResolver...resolvers) {
* Atom).
*/
public RouterFunctionMockMvcBuilder setSingleView(View view) {
this.viewResolvers = Collections.<ViewResolver>singletonList(new StaticViewResolver(view));
this.viewResolvers = Collections.singletonList(new StaticViewResolver(view));
return this;
}

Expand Down Expand Up @@ -226,7 +226,7 @@ private void registerRouterFunction(StubWebApplicationContext wac) {
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);
}
Expand Down

0 comments on commit 92f54da

Please sign in to comment.