INT-1704 fixed FTP/SFTP tests that broke the build due to the change introduced with file renaming

This commit is contained in:
Oleg Zhurakousky
2010-12-21 15:55:12 -05:00
parent 45e62cdabc
commit a4366a8986
2 changed files with 4 additions and 2 deletions

View File

@@ -137,7 +137,8 @@ public class FtpSendingMessageHandlerTest {
public Boolean answer(InvocationOnMock invocation)
throws Throwable {
File file = new File((String) invocation.getArguments()[0]);
file.renameTo(new File(file.getParent(), (String) invocation.getArguments()[1]));
File renameToFile = new File((String) invocation.getArguments()[1]);
file.renameTo(renameToFile);
return true;
}
});

View File

@@ -126,7 +126,8 @@ public class SftpSendingMessageHandlerTests {
throws Throwable {
File file = new File((String) invocation.getArguments()[0]);
assertTrue(file.getName().endsWith(FileWritingMessageHandler.TEMPORARY_FILE_SUFFIX));
file.renameTo(new File(file.getParent(), (String) invocation.getArguments()[1]));
File renameToFile = new File((String) invocation.getArguments()[1]);
file.renameTo(renameToFile);
return null;
}