コード例 #1
0
  @Test
  public void relativePathForDirIsSpecPathPlusFilePath() {
    FileVisitDetails visitDetails = expectSpecAndDirVisited();

    context.checking(
        new Expectations() {
          {
            allowing(spec).getDestPath();
            will(returnValue(new RelativePath(false, "spec")));
            allowing(details).getRelativePath();
            will(returnValue(new RelativePath(false, "dir")));
          }
        });

    assertThat(visitDetails.getRelativePath(), equalTo(new RelativePath(false, "spec", "dir")));
  }
コード例 #2
0
 public void visitFile(FileVisitDetails source) {
   File target = source.getRelativePath().getFile(baseDestDir);
   copyFile(source, target);
 }