ExtractionDiffsPaths { public String sourceFileMatchPath(Path extractionDiffPath, String extractionDiffName) { String relativePath = extractionDiffPath(extractionDiffName).relativize(extractionDiffPath).toString(); String withoutExtension = relativePath.substring(0, relativePath.length() - JSON_FILE_EXTENSION.length()); return withoutExtension; } 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 sourceFileMatchPath() { ExtractionDiffsPaths extractionDiffsPaths = new ExtractionDiffsPaths(outputDirectory); extractionDiffsPaths.sourceFileMatchPath(Paths.get(outputDirectory, extractionDiffName, "LC_MESSAGES/messages.pot.json"), extractionDiffName); }