@Test void shouldCopyFile() throws InterruptedException { AffectedFilesResolver resolver = new AffectedFilesResolver(); Report report = new Report(); Issue issue = new IssueBuilder().setFileName(FILE_NAME).build(); report.add(issue); RemoteFacade remoteFacade = mock(RemoteFacade.class); when(remoteFacade.exists(FILE_NAME)).thenReturn(true); when(remoteFacade.isInWorkspace(FILE_NAME)).thenReturn(true); resolver.copyAffectedFilesToBuildFolder(report, remoteFacade); assertThat(report.getErrorMessages()).isEmpty(); assertThat(report.getInfoMessages()).hasSize(1); String message = report.getInfoMessages().get(0); assertThat(message).contains("1 copied"); assertThat(message).contains("0 not in workspace"); assertThat(message).contains("0 not-found"); assertThat(message).contains("0 with I/O error"); }
public void copyAffectedFilesToBuildFolder(final Report report, final FilePath buildFolder, final FilePath affectedFilesFolder) throws InterruptedException { copyAffectedFilesToBuildFolder(report, new RemoteFacade(buildFolder, affectedFilesFolder)); }
AffectedFilesResolver { public void copyAffectedFilesToBuildFolder(final Report report, final FilePath buildFolder, final FilePath affectedFilesFolder) throws InterruptedException { copyAffectedFilesToBuildFolder(report, new RemoteFacade(buildFolder, affectedFilesFolder)); } }
AffectedFilesResolver { public void copyAffectedFilesToBuildFolder(final Report report, final FilePath buildFolder, final FilePath affectedFilesFolder) throws InterruptedException { copyAffectedFilesToBuildFolder(report, new RemoteFacade(buildFolder, affectedFilesFolder)); }  }
AffectedFilesResolver { public void copyAffectedFilesToBuildFolder(final Report report, final FilePath buildFolder, final FilePath affectedFilesFolder) throws InterruptedException { copyAffectedFilesToBuildFolder(report, new RemoteFacade(buildFolder, affectedFilesFolder)); }  static boolean hasAffectedFile(final Run<?, ?> run, final Issue issue); static Path getFile(final Run<?, ?> run, final String fileName); void copyAffectedFilesToBuildFolder(final Report report, final FilePath buildFolder,
            final FilePath affectedFilesFolder); }
AffectedFilesResolver { public void copyAffectedFilesToBuildFolder(final Report report, final FilePath buildFolder, final FilePath affectedFilesFolder) throws InterruptedException { copyAffectedFilesToBuildFolder(report, new RemoteFacade(buildFolder, affectedFilesFolder)); }  static boolean hasAffectedFile(final Run<?, ?> run, final Issue issue); static Path getFile(final Run<?, ?> run, final String fileName); void copyAffectedFilesToBuildFolder(final Report report, final FilePath buildFolder,
            final FilePath affectedFilesFolder); static final String AFFECTED_FILES_FOLDER_NAME; }