Make sure testResourceCopyToDirectory() tests copying a file resource to a target folder

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2024-03-07 12:08:54 +01:00
parent 435384420f
commit 5de0141423
1 changed files with 3 additions and 2 deletions

View File

@ -298,10 +298,11 @@ public class ResourceTest
Resource resource = data.getResource();
Assumptions.assumeTrue(resource != null);
Path targetDir = workDir.getEmptyPathDir().resolve(resource.getFileName());
Path targetDir = workDir.getEmptyPathDir();
resource.copyTo(targetDir);
assertResourceSameAsPath(resource, targetDir);
Path targetToTest = resource.isDirectory() ? targetDir : targetDir.resolve(resource.getFileName());
assertResourceSameAsPath(resource, targetToTest);
}
@ParameterizedTest