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 5151import org .springframework .core .Ordered ;
5252import org .springframework .core .annotation .Order ;
5353import org .springframework .core .convert .ConversionService ;
54+ import org .springframework .core .io .ClassPathResource ;
5455import org .springframework .format .Parser ;
5556import org .springframework .format .Printer ;
5657import org .springframework .format .support .FormattingConversionService ;
@@ -157,13 +158,12 @@ void shouldRegisterResourceHandlerMapping() {
157158 SimpleUrlHandlerMapping hm = context .getBean ("resourceHandlerMapping" , SimpleUrlHandlerMapping .class );
158159 assertThat (hm .getUrlMap ().get ("/**" )).isInstanceOf (ResourceWebHandler .class );
159160 ResourceWebHandler staticHandler = (ResourceWebHandler ) hm .getUrlMap ().get ("/**" );
160- assertThat (staticHandler ).extracting ("locationValues" ).asList ().hasSize (4 );
161- assertThat (staticHandler .getLocations ()).hasSize (1 );
162- assertThat (staticHandler .getLocations ().get (0 )).hasToString ("class path resource [public/]" );
161+ assertThat (staticHandler .getLocations ()).hasSize (4 );
163162 assertThat (hm .getUrlMap ().get ("/webjars/**" )).isInstanceOf (ResourceWebHandler .class );
164163 ResourceWebHandler webjarsHandler = (ResourceWebHandler ) hm .getUrlMap ().get ("/webjars/**" );
165- assertThat (webjarsHandler ).extracting ("locationValues" ).asList ()
166- .containsExactly ("classpath:/META-INF/resources/webjars/" );
164+ assertThat (webjarsHandler .getLocations ()).hasSize (1 );
165+ assertThat (webjarsHandler .getLocations ().get (0 ))
166+ .isEqualTo (new ClassPathResource ("/META-INF/resources/webjars/" ));
167167 });
168168 }
169169
You can’t perform that action at this time.
0 commit comments