Skip to content

Commit

Permalink
Make the tests a bit more robust.
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsbasjes authored and tcurdt committed Nov 21, 2023
1 parent 46cb42e commit 17a8370
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void testIssue47() throws IOException {
.map( i -> i.toString() )
.collect(Collectors.toSet());
assertEquals(1, units.size());
assertTrue(units.iterator().next().endsWith("woodstox-core-6.2.3.jar"));
assertTrue(units.iterator().next().endsWith("/woodstox-core-6.2.3.jar"));
}

@Test
Expand Down Expand Up @@ -167,13 +167,13 @@ public void testShouldHaveUnitId() throws IOException {
final Clazzpath cp = new Clazzpath();

final ClazzpathUnit u1 = cp.addClazzpathUnit(resourceFile("jar1.jar"));
assertTrue(u1.toString().endsWith("jar1.jar"));
assertTrue(u1.toString().endsWith("/jar1.jar"));

final ClazzpathUnit u1e = cp.addClazzpathUnit(resourceFile("jar1.jar"), "jar1");
assertEquals(u1e.toString(), "jar1");

final ClazzpathUnit u2 = cp.addClazzpathUnit(resourcePath("jar2.jar"));
assertTrue(u2.toString().endsWith("jar2.jar"));
assertTrue(u2.toString().endsWith("/jar2.jar"));

final ClazzpathUnit u2e = cp.addClazzpathUnit(resourcePath("jar2.jar"), "jar2");
assertEquals(u2e.toString(), "jar2");
Expand Down

0 comments on commit 17a8370

Please sign in to comment.