ExtractionDiffsPaths { public Stream<Path> findAllAssetExtractionDiffPaths(String diffExtractionName) { return Files.find( extractionDiffPath(diffExtractionName), 100, (p, f) -> p.toString().endsWith(JSON_FILE_EXTENSION)); } ExtractionDiffsPaths(String outputDirectory); Path outputDirectory(); Path extractionDiffPath(String diffExtractionName); Path assetExtractionDiffPath(String sourceFileMatchPath, String diffExtractionName); String sourceFileMatchPath(Path extractionDiffPath, String extractionDiffName); Stream<Path> findAllAssetExtractionDiffPaths(String diffExtractionName); static final String DEFAULT_OUTPUT_DIRECTORY; }
@Test public void findAllAssetExtractionDiffPaths() { File inputResourcesTestDir = getInputResourcesTestDir(); ExtractionDiffsPaths extractionDiffsPaths = new ExtractionDiffsPaths(inputResourcesTestDir.getPath()); Set<Path> allAssetExtractionPaths = extractionDiffsPaths.findAllAssetExtractionDiffPaths(extractionDiffName).collect(Collectors.toSet()); Assert.assertEquals( Sets.newHashSet( inputResourcesTestDir.toPath().resolve(Paths.get("testExtractionDiffName/LC_MESSAGES/messages.pot.json")), inputResourcesTestDir.toPath().resolve(Paths.get("testExtractionDiffName/LC_MESSAGES/messages2.pot.json"))) , allAssetExtractionPaths); }