ExtractionsPaths { List<Path> findAllAssetExtractionPaths(String extractionName) { return Files.find( extractionPath(extractionName), 100, (p, f) -> p.toString().endsWith(JSON_FILE_EXTENSION)). collect(Collectors.toList()); } ExtractionsPaths(String outputDirectory); Path outputDirectory(); static final String DEFAULT_OUTPUT_DIRECTORY; }
@Test public void findAllAssetExtractionPaths() { File inputResourcesTestDir = getInputResourcesTestDir(); ExtractionsPaths extractionsPaths = new ExtractionsPaths(inputResourcesTestDir.getPath()); List<Path> allAssetExtractionPaths = extractionsPaths.findAllAssetExtractionPaths(extractName); Assert.assertEquals( Sets.newHashSet( inputResourcesTestDir.toPath().resolve(Paths.get("testExtract/LC_MESSAGES/messages.pot.json")), inputResourcesTestDir.toPath().resolve(Paths.get("testExtract/LC_MESSAGES/messages2.pot.json"))) , new HashSet<>(allAssetExtractionPaths)); }