Test for skipped prefixes in inputs
@@ -8,6 +8,7 @@ import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.Collections;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -64,6 +65,18 @@ public class ResourceInputTest extends Base {
assertEquals(27, resource.getClasses().size());
}
+ @Test
+ public void testSkipPrefixes() {
+ try {
+ File file = getClasspathFile("calc.jar");
+ JavaResource resource = new JarResource(file);
+ resource.setSkippedPrefixes(Collections.singletonList("calc"));
+ assertEquals(1, resource.getClasses().size());
+ } catch(IOException ex) {
+ fail(ex);
+ }
+ }
+
// ================== BAD INPUTS ====================== //
@Test
