Skip to content

Commit

Permalink
Use a path that works in Windows and Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed May 14, 2022
1 parent 454ff58 commit ccaad24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/edu/hm/hafner/util/ResourceExtractorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ void shouldHandleClassloaderProblems() {
.isThrownBy(() -> new ResourceExtractor(ResourceExtractor.class, protectionDomain))
.withMessageContaining("CodeSource location path", "ResourceExtractor");

when(url.getPath()).thenReturn("file://file.jar");
when(url.getPath()).thenReturn("file.jar");
ResourceExtractor extractor = new ResourceExtractor(ResourceExtractor.class, protectionDomain);

assertThat(extractor.getResourcePath()).isEqualTo("file:/file.jar");
assertThat(extractor.getResourcePath()).isEqualTo("file.jar");
}

private String readToString(final Path output) {
Expand Down

0 comments on commit ccaad24

Please sign in to comment.