Adapt to Spring Framework API change
This commit is contained in:
@@ -40,20 +40,20 @@ class WebResourcesRuntimeHintsTests {
|
||||
void registerHintsWithAllLocations() {
|
||||
RuntimeHints hints = register(
|
||||
new TestClassLoader(List.of("META-INF/resources/", "resources/", "static/", "public/")));
|
||||
assertThat(hints.resources().resourcePatterns()).singleElement()
|
||||
assertThat(hints.resources().resourcePatternHints()).singleElement()
|
||||
.satisfies(include("META-INF/resources/*", "resources/*", "static/*", "public/*"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void registerHintsWithOnlyStaticLocations() {
|
||||
RuntimeHints hints = register(new TestClassLoader(List.of("static/")));
|
||||
assertThat(hints.resources().resourcePatterns()).singleElement().satisfies(include("static/*"));
|
||||
assertThat(hints.resources().resourcePatternHints()).singleElement().satisfies(include("static/*"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void registerHintsWithNoLocation() {
|
||||
RuntimeHints hints = register(new TestClassLoader(List.of()));
|
||||
assertThat(hints.resources().resourcePatterns()).isEmpty();
|
||||
assertThat(hints.resources().resourcePatternHints()).isEmpty();
|
||||
}
|
||||
|
||||
private RuntimeHints register(ClassLoader classLoader) {
|
||||
|
||||
Reference in New Issue
Block a user