Skip to content

Commit ccaad24

Browse files
committed
Use a path that works in Windows and Linux.
1 parent 454ff58 commit ccaad24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/edu/hm/hafner/util/ResourceExtractorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ void shouldHandleClassloaderProblems() {
121121
.isThrownBy(() -> new ResourceExtractor(ResourceExtractor.class, protectionDomain))
122122
.withMessageContaining("CodeSource location path", "ResourceExtractor");
123123

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

127-
assertThat(extractor.getResourcePath()).isEqualTo("file:/file.jar");
127+
assertThat(extractor.getResourcePath()).isEqualTo("file.jar");
128128
}
129129

130130
private String readToString(final Path output) {

0 commit comments

Comments
 (0)