@Test public void testListWithCowjarOnClasspath() { try { String projectVersion = System.getProperty("project.version"); String jarpath = "cowjar-js-" + projectVersion + ".jar"; jarpath = String.join(File.separator, "..", "cowjar-js", "target", jarpath); File jarfile = new File(jarpath); Assume.assumeTrue("jar required for this test " + jarfile.getAbsolutePath(), jarfile.exists()); ClassLoader cl = this.getClass().getClassLoader(); URLClassLoader classloader = new URLClassLoader(new URL[]{jarfile.toURI().toURL()}, cl); String[] result = Cowloader.listAllCowfiles(classloader); String[] expected = TestUtils.getCowjarCowNames(new String[]{"cowjar", "cowjar-js"}); Assert.assertArrayEquals(expected, result); } catch (MalformedURLException ex) { Assert.fail(ex.getMessage()); } }
public static String[] listAllCowfiles() { return listAllCowfiles(Cowloader.class.getClassLoader()); }
Cowloader { public static String[] listAllCowfiles() { return listAllCowfiles(Cowloader.class.getClassLoader()); } }
Cowloader { public static String[] listAllCowfiles() { return listAllCowfiles(Cowloader.class.getClassLoader()); } private  Cowloader(); }
Cowloader { public static String[] listAllCowfiles() { return listAllCowfiles(Cowloader.class.getClassLoader()); } private  Cowloader(); static String load(final String cowfileSpec); static void setCowEnvironment(final Environment env); static String[] listAllCowfiles(); static String[] listAllCowfiles(final ClassLoader classloader); }
Cowloader { public static String[] listAllCowfiles() { return listAllCowfiles(Cowloader.class.getClassLoader()); } private  Cowloader(); static String load(final String cowfileSpec); static void setCowEnvironment(final Environment env); static String[] listAllCowfiles(); static String[] listAllCowfiles(final ClassLoader classloader); static final String COWFILE_EXT; static final String DEFAULT_COW; }