@Test public void testResolveWithTargetDirectory() { Path pathInSourceDirectory = Paths.get("source/sub/file1"); CommandDirectories instance = new CommandDirectories("source", "target"); Path expResult = Paths.get("target/sub/file1"); Path result = instance.resolveWithTargetDirectory(pathInSourceDirectory); assertEquals(expResult, result); }
public Path resolveWithTargetDirectory(Path pathInSourceDirectory) { return relativizeWithUserDirectory(targetDirectoryPath.resolve(relativizeWithSourceDirectory(pathInSourceDirectory))); }
CommandDirectories { public Path resolveWithTargetDirectory(Path pathInSourceDirectory) { return relativizeWithUserDirectory(targetDirectoryPath.resolve(relativizeWithSourceDirectory(pathInSourceDirectory))); } }
CommandDirectories { public Path resolveWithTargetDirectory(Path pathInSourceDirectory) { return relativizeWithUserDirectory(targetDirectoryPath.resolve(relativizeWithSourceDirectory(pathInSourceDirectory))); } CommandDirectories(String sourceDirectoryPathString);  CommandDirectories(String sourceDirectoryPathString, String targetDirectoryPathString); }
CommandDirectories { public Path resolveWithTargetDirectory(Path pathInSourceDirectory) { return relativizeWithUserDirectory(targetDirectoryPath.resolve(relativizeWithSourceDirectory(pathInSourceDirectory))); } CommandDirectories(String sourceDirectoryPathString);  CommandDirectories(String sourceDirectoryPathString, String targetDirectoryPathString); Path resolveWithTargetDirectory(Path pathInSourceDirectory); Path resolveWithTargetDirectoryAndCreateParentDirectories(Path pathInSourceDirectory); Path relativizeWithSourceDirectory(Path path); Path relativizeWithTargetDirectory(Path path); Path relativizeWithUserDirectory(Path path); List<Path> listFilesWithExtensionInSourceDirectory(String... extensions); Path getSourceDirectoryPath(); Path getTargetDirectoryPath(); }
CommandDirectories { public Path resolveWithTargetDirectory(Path pathInSourceDirectory) { return relativizeWithUserDirectory(targetDirectoryPath.resolve(relativizeWithSourceDirectory(pathInSourceDirectory))); } CommandDirectories(String sourceDirectoryPathString);  CommandDirectories(String sourceDirectoryPathString, String targetDirectoryPathString); Path resolveWithTargetDirectory(Path pathInSourceDirectory); Path resolveWithTargetDirectoryAndCreateParentDirectories(Path pathInSourceDirectory); Path relativizeWithSourceDirectory(Path path); Path relativizeWithTargetDirectory(Path path); Path relativizeWithUserDirectory(Path path); List<Path> listFilesWithExtensionInSourceDirectory(String... extensions); Path getSourceDirectoryPath(); Path getTargetDirectoryPath();  }