Skip to content

Commit

Permalink
One more test: when manifest is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
sleberknight committed Sep 19, 2024
1 parent d60590b commit b470610
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/test/java/org/kiwiproject/jar/KiwiJarsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,16 @@ void shouldReturnEmptyMapIfValuesCouldNotBeFoundInManifest_UsingDefaultClassLoad
@Test
void shouldReturnEmptyMap_ForInvalidClassLoader() {
ClassLoader classLoader = null;
var values = KiwiJars.readValuesFromJarManifest(classLoader, "foo");
var values = KiwiJars.readValuesFromJarManifest(classLoader, "Main-Class");

assertThat(values).isEmpty();
}

@Test
void shouldReturnEmptyMap_WhenManifestCannotBeFound() {
var values = KiwiJars.readValuesFromJarManifest(this.getClass().getClassLoader(),
url -> false, // ensures manifest won't be found
"Main-Class");

assertThat(values).isEmpty();
}
Expand Down

0 comments on commit b470610

Please sign in to comment.