File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 5050import org .springframework .core .Ordered ;
5151import org .springframework .core .annotation .Order ;
5252import org .springframework .core .convert .ConversionService ;
53+ import org .springframework .core .io .ClassPathResource ;
5354import org .springframework .format .Parser ;
5455import org .springframework .format .Printer ;
5556import org .springframework .format .support .FormattingConversionService ;
@@ -150,13 +151,12 @@ void shouldRegisterResourceHandlerMapping() {
150151 SimpleUrlHandlerMapping hm = context .getBean ("resourceHandlerMapping" , SimpleUrlHandlerMapping .class );
151152 assertThat (hm .getUrlMap ().get ("/**" )).isInstanceOf (ResourceWebHandler .class );
152153 ResourceWebHandler staticHandler = (ResourceWebHandler ) hm .getUrlMap ().get ("/**" );
153- assertThat (staticHandler ).extracting ("locationValues" ).asList ().hasSize (4 );
154- assertThat (staticHandler .getLocations ()).hasSize (1 );
155- assertThat (staticHandler .getLocations ().get (0 )).hasToString ("class path resource [public/]" );
154+ assertThat (staticHandler .getLocations ()).hasSize (4 );
156155 assertThat (hm .getUrlMap ().get ("/webjars/**" )).isInstanceOf (ResourceWebHandler .class );
157156 ResourceWebHandler webjarsHandler = (ResourceWebHandler ) hm .getUrlMap ().get ("/webjars/**" );
158- assertThat (webjarsHandler ).extracting ("locationValues" ).asList ()
159- .containsExactly ("classpath:/META-INF/resources/webjars/" );
157+ assertThat (webjarsHandler .getLocations ()).hasSize (1 );
158+ assertThat (webjarsHandler .getLocations ().get (0 ))
159+ .isEqualTo (new ClassPathResource ("/META-INF/resources/webjars/" ));
160160 });
161161 }
162162
You can’t perform that action at this time.
0 commit comments