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 5454import org .springframework .core .Ordered ;
5555import org .springframework .core .annotation .Order ;
5656import org .springframework .core .convert .ConversionService ;
57+ import org .springframework .core .io .ClassPathResource ;
5758import org .springframework .format .Parser ;
5859import org .springframework .format .Printer ;
5960import org .springframework .format .support .FormattingConversionService ;
@@ -164,13 +165,12 @@ void shouldRegisterResourceHandlerMapping() {
164165 SimpleUrlHandlerMapping hm = context .getBean ("resourceHandlerMapping" , SimpleUrlHandlerMapping .class );
165166 assertThat (hm .getUrlMap ().get ("/**" )).isInstanceOf (ResourceWebHandler .class );
166167 ResourceWebHandler staticHandler = (ResourceWebHandler ) hm .getUrlMap ().get ("/**" );
167- assertThat (staticHandler ).extracting ("locationValues" ).asList ().hasSize (4 );
168- assertThat (staticHandler .getLocations ()).hasSize (1 );
169- assertThat (staticHandler .getLocations ().get (0 )).hasToString ("class path resource [public/]" );
168+ assertThat (staticHandler .getLocations ()).hasSize (4 );
170169 assertThat (hm .getUrlMap ().get ("/webjars/**" )).isInstanceOf (ResourceWebHandler .class );
171170 ResourceWebHandler webjarsHandler = (ResourceWebHandler ) hm .getUrlMap ().get ("/webjars/**" );
172- assertThat (webjarsHandler ).extracting ("locationValues" ).asList ()
173- .containsExactly ("classpath:/META-INF/resources/webjars/" );
171+ assertThat (webjarsHandler .getLocations ()).hasSize (1 );
172+ assertThat (webjarsHandler .getLocations ().get (0 ))
173+ .isEqualTo (new ClassPathResource ("/META-INF/resources/webjars/" ));
174174 });
175175 }
176176
You can’t perform that action at this time.
0 commit comments