@Test(expected = FileNotFoundException.class) public void testScanFileNotFound() throws Exception { File folder = new File(tmpFolder.getRoot(), "A"); ImportFileScanner instance = new ImportFileScanner(); List<Folder> result = instance.findSubfolders(folder, new FileSetImport()); }
public List<Folder> findSubfolders(File folder, ImportHandler importer) throws FileNotFoundException, IllegalArgumentException { validateImportFolder(folder); File[] listFiles = folder.listFiles(FOLDER_FILTER); Arrays.sort(listFiles, FILE_COMPARATOR); List<Folder> content = new ArrayList<Folder>(listFiles.length); for (File file : listFiles) { content.add(new Folder(file, importer)); } return content; }
ImportFileScanner { public List<Folder> findSubfolders(File folder, ImportHandler importer) throws FileNotFoundException, IllegalArgumentException { validateImportFolder(folder); File[] listFiles = folder.listFiles(FOLDER_FILTER); Arrays.sort(listFiles, FILE_COMPARATOR); List<Folder> content = new ArrayList<Folder>(listFiles.length); for (File file : listFiles) { content.add(new Folder(file, importer)); } return content; } }
ImportFileScanner { public List<Folder> findSubfolders(File folder, ImportHandler importer) throws FileNotFoundException, IllegalArgumentException { validateImportFolder(folder); File[] listFiles = folder.listFiles(FOLDER_FILTER); Arrays.sort(listFiles, FILE_COMPARATOR); List<Folder> content = new ArrayList<Folder>(listFiles.length); for (File file : listFiles) { content.add(new Folder(file, importer)); } return content; }  }
ImportFileScanner { public List<Folder> findSubfolders(File folder, ImportHandler importer) throws FileNotFoundException, IllegalArgumentException { validateImportFolder(folder); File[] listFiles = folder.listFiles(FOLDER_FILTER); Arrays.sort(listFiles, FILE_COMPARATOR); List<Folder> content = new ArrayList<Folder>(listFiles.length); for (File file : listFiles) { content.add(new Folder(file, importer)); } return content; }  List<Folder> findSubfolders(File folder, ImportHandler importer); List<File> findDigitalContent(File folder); static List<FileSet> getFileSets(List<File> files); }
ImportFileScanner { public List<Folder> findSubfolders(File folder, ImportHandler importer) throws FileNotFoundException, IllegalArgumentException { validateImportFolder(folder); File[] listFiles = folder.listFiles(FOLDER_FILTER); Arrays.sort(listFiles, FILE_COMPARATOR); List<Folder> content = new ArrayList<Folder>(listFiles.length); for (File file : listFiles) { content.add(new Folder(file, importer)); } return content; }  List<Folder> findSubfolders(File folder, ImportHandler importer); List<File> findDigitalContent(File folder); static List<FileSet> getFileSets(List<File> files); static final String IMPORT_STATE_FILENAME; }