ExtractionsPaths { String sourceFileMatchPath(Path extractionPath, String extractionName) { String relativePath = extractionPath(extractionName).relativize(extractionPath).toString(); String withoutExtension = relativePath.substring(0, relativePath.length() - JSON_FILE_EXTENSION.length()); return withoutExtension; } ExtractionsPaths(String outputDirectory); Path outputDirectory(); static final String DEFAULT_OUTPUT_DIRECTORY; }
@Test public void sourceFileMatchPath() { ExtractionsPaths extractionsPaths = new ExtractionsPaths(outputDirectory); extractionsPaths.sourceFileMatchPath(Paths.get(outputDirectory, extractName, "LC_MESSAGES/messages.pot.json"), extractName); }