@Test public void listFilesReturnsAllFilesRecursively() { CompiledJavaccFilesDirectory directory = new CompiledJavaccFilesDirectory(new File(getClass().getResource("/compiledResultsWithSubFolders").getFile()), null, null, null); Collection<CompiledJavaccFile> files = directory.listFiles(); final int numberOfFilesInFolder = 3; assertThat(files, hasSize(numberOfFilesInFolder)); }
public Collection<CompiledJavaccFile> listFiles() { Collection<File> files = FileUtils.listFiles(outputDirectory, TrueFileFilter.TRUE, TrueFileFilter.TRUE); Collection<CompiledJavaccFile> compiledJavaccFiles = new ArrayList<CompiledJavaccFile>(); for (File file : files) { CompiledJavaccFile compiledJavaccFile = new CompiledJavaccFile(file, outputDirectory, customAstClassesDirectory, targetDirectory, logger); compiledJavaccFiles.add(compiledJavaccFile); } return compiledJavaccFiles; }
CompiledJavaccFilesDirectory { public Collection<CompiledJavaccFile> listFiles() { Collection<File> files = FileUtils.listFiles(outputDirectory, TrueFileFilter.TRUE, TrueFileFilter.TRUE); Collection<CompiledJavaccFile> compiledJavaccFiles = new ArrayList<CompiledJavaccFile>(); for (File file : files) { CompiledJavaccFile compiledJavaccFile = new CompiledJavaccFile(file, outputDirectory, customAstClassesDirectory, targetDirectory, logger); compiledJavaccFiles.add(compiledJavaccFile); } return compiledJavaccFiles; } }
CompiledJavaccFilesDirectory { public Collection<CompiledJavaccFile> listFiles() { Collection<File> files = FileUtils.listFiles(outputDirectory, TrueFileFilter.TRUE, TrueFileFilter.TRUE); Collection<CompiledJavaccFile> compiledJavaccFiles = new ArrayList<CompiledJavaccFile>(); for (File file : files) { CompiledJavaccFile compiledJavaccFile = new CompiledJavaccFile(file, outputDirectory, customAstClassesDirectory, targetDirectory, logger); compiledJavaccFiles.add(compiledJavaccFile); } return compiledJavaccFiles; } CompiledJavaccFilesDirectory(File outputDirectory, FileTree customAstClassesDirectory, File targetDirectory, Logger logger); }
CompiledJavaccFilesDirectory { public Collection<CompiledJavaccFile> listFiles() { Collection<File> files = FileUtils.listFiles(outputDirectory, TrueFileFilter.TRUE, TrueFileFilter.TRUE); Collection<CompiledJavaccFile> compiledJavaccFiles = new ArrayList<CompiledJavaccFile>(); for (File file : files) { CompiledJavaccFile compiledJavaccFile = new CompiledJavaccFile(file, outputDirectory, customAstClassesDirectory, targetDirectory, logger); compiledJavaccFiles.add(compiledJavaccFile); } return compiledJavaccFiles; } CompiledJavaccFilesDirectory(File outputDirectory, FileTree customAstClassesDirectory, File targetDirectory, Logger logger); Collection<CompiledJavaccFile> listFiles(); @Override String toString(); }
CompiledJavaccFilesDirectory { public Collection<CompiledJavaccFile> listFiles() { Collection<File> files = FileUtils.listFiles(outputDirectory, TrueFileFilter.TRUE, TrueFileFilter.TRUE); Collection<CompiledJavaccFile> compiledJavaccFiles = new ArrayList<CompiledJavaccFile>(); for (File file : files) { CompiledJavaccFile compiledJavaccFile = new CompiledJavaccFile(file, outputDirectory, customAstClassesDirectory, targetDirectory, logger); compiledJavaccFiles.add(compiledJavaccFile); } return compiledJavaccFiles; } CompiledJavaccFilesDirectory(File outputDirectory, FileTree customAstClassesDirectory, File targetDirectory, Logger logger); Collection<CompiledJavaccFile> listFiles(); @Override String toString();  }