@Test public void testListWithDirectoryOnClasspath() { String projectVersion = System.getProperty("project.version"); File cowdir = TestUtils.getPathToCows("cowjar-extra"); ClassLoader cl = this.getClass().getClassLoader(); URL dirUrl = null; try { dirUrl = cowdir.getParentFile().getCanonicalFile().toURI().toURL(); } catch (IOException ex) { Assert.fail(ex.getMessage()); } URLClassLoader classloader = new URLClassLoader(new URL[]{dirUrl}, cl); String[] result = Cowloader.listAllCowfiles(classloader); String[] expected = TestUtils.getCowjarCowNames(new String[]{"cowjar", "cowjar-extra"}); Assert.assertArrayEquals(expected, result); }
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; }