Skip to content

Commit

Permalink
Adapt to PathMatchingResourcePatternResolver's behavior being reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Sep 30, 2022
1 parent 5b092f5 commit 03b3a77
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ void getResourceWhenDeletedShouldReturnDeletedResource(@TempDir File directory)
void getResourcesShouldReturnResources(@TempDir File directory) throws Exception {
File file = createFile(directory, "name.class");
Resource[] resources = this.resolver.getResources("file:" + directory.getAbsolutePath() + "/**");
assertThat(resources).extracting(Resource::getFile).containsExactly(directory, file);
assertThat(resources).extracting(Resource::getFile).containsExactly(file);
}

@Test
void getResourcesWhenDeletedShouldFilterDeleted(@TempDir File directory) throws Exception {
createFile(directory, "name.class");
this.files.addFile(directory.getName(), "name.class", new ClassLoaderFile(Kind.DELETED, null));
Resource[] resources = this.resolver.getResources("file:" + directory.getAbsolutePath() + "/**");
assertThat(resources).extracting(Resource::getFile).containsExactly(directory);
assertThat(resources).isEmpty();
}

@Test
Expand Down

0 comments on commit 03b3a77

Please sign in to comment.