Skip to content

Commit

Permalink
fix "JarFileShadingTest" on Java 9
Browse files Browse the repository at this point in the history
  • Loading branch information
bsideup committed Feb 11, 2018
1 parent fe62ccf commit 4471878
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@ public class JarFileShadingTest extends AbstractJarFileTest {
public void testPackages() throws Exception {
assertThatFileList(root).containsOnly(
"docker-java.properties",
"org/",
"META-INF/",
"com/"
"org",
"META-INF",
"com"
);

assertThatFileList(root.resolve("org")).containsOnly(
"testcontainers/"
"testcontainers"
);

assertThatFileList(root.resolve("com")).containsOnly(
"github/"
"github"
);

assertThatFileList(root.resolve("com").resolve("github")).containsOnly(
"dockerjava/"
"dockerjava"
);
}

@Test
public void testMetaInf() throws Exception {
assertThatFileList(root.resolve("META-INF")).containsOnly(
"MANIFEST.MF",
"services/",
"native/"
"services",
"native"
);

assertThatFileList(root.resolve("META-INF").resolve("native")).containsOnly(
Expand All @@ -56,6 +56,7 @@ public void testMetaInfServices() throws Exception {
private ListAssert<String> assertThatFileList(Path path) throws IOException {
return (ListAssert) assertThat(Files.list(path))
.extracting(Path::getFileName)
.extracting(Object::toString);
.extracting(Path::toString)
.extracting(it -> it.endsWith("/") ? it.substring(0, it.length() - 1) : it);
}
}

0 comments on commit 4471878

Please sign in to comment.