@Test public void testGatherAll() throws IOException { InputSupplier supp = new MultiDirSupplier(dirs); // gather all the relative paths for (String rel : supp.gatherAll(END)) { Assert.assertTrue(expectedFiles.containsValue(rel)); } supp.close(); // to please the compiler.. }
@Test public void testGetRoot() throws IOException { InputSupplier supp = new MultiDirSupplier(dirs); for (File dir : expectedFiles.keySet()) { for (String rel : expectedFiles.get(dir)) { Assert.assertEquals(dir, new File(supp.getRoot(rel)).getCanonicalFile()); } } supp.close(); // to please the compiler.. }