public void TestSftpDownload() { var srcTransDirector = new ConcreteTransferServiceDirector(); var result = srcTransDirector.DownloadFile(TransferProtocol.Sftp, new TransmissionDetails { ConnectionDetails = _conDetails, TransferDetails = _downloadDetails }); Assert.True(result.ProcessCompletionState, "File downloaded successfully"); }/*End of TestSftpDownload method*/
public void TestSftpUpload() { var srcTransDirector = new ConcreteTransferServiceDirector(); var result = srcTransDirector.UploadFile(TransferProtocol.Sftp, new TransmissionDetails { ConnectionDetails = _conDetails, TransferDetails = _uploadDetails }); Assert.True(result.ProcessCompletionState, "The file was uploaded to the SFTP server"); } /*End of TestSftpDownload method*/
public void TestSftpDirectoryContent() { var srcTransDirector = new ConcreteTransferServiceDirector(); var result = srcTransDirector.ListFiles(TransferProtocol.Sftp, new TransmissionDetails { FileIoDetails = _fileIoDetails, ConnectionDetails = _conDetails }); Assert.Contains(result.ProcessResultValue, file => file.Equals("XPOLLD09800001")); }/*End of TestSftpDirectoryContent method*/
public void TestSftpFileExists() { var srcTransDirector = new ConcreteTransferServiceDirector(); var result = srcTransDirector.FileExists(TransferProtocol.Sftp, new TransmissionDetails { FileIoDetails = _fileIoDetails, ConnectionDetails = _conDetails }); Assert.True(result.ProcessCompletionState, "File exists on the SFTP"); }/*End of TestSftpDownload method*/
public void Test_Ftp_File_Exists() { var srcTransDirector = new ConcreteTransferServiceDirector(); var result = srcTransDirector.FileExists(TransferProtocol.Ftp, new TransmissionDetails { ConnectionDetails = _conDetails, FileIoDetails = _fileIoDetails }); Assert.True(result.ProcessCompletionState, "The was found on the server"); }/*End of TestSftpDownload method*/
public void Test_Ftp_Remove() { var srcTransDirector = new ConcreteTransferServiceDirector(); var result = srcTransDirector.RemoveFile(TransferProtocol.Ftp, new TransmissionDetails { ConnectionDetails = _conDetails, FileIoDetails = _fileIoDetails }); Assert.True(result.ProcessCompletionState, "The file was deleted from the FTP sever"); } /*End of TestSftpDirectoryContent method*/