public async Task UploadFile_DownloadedFileMatchLocal()
        {
            // Arrange
            using Stream sampleFileStream = GetEmbeddedResource(SampleFileName);

            var localFileContent = ToByteArray(sampleFileStream);

            sampleFileStream.Position = 0;
            SFtpServerConfiguration configuration = _sftpServerResource.FtpServerConfiguration;

            // Act
            _sftpServerResource.Upload(sampleFileStream, SampleFileName, configuration.Directory);

            //Assert
            byte[] downloadedFile =
                _sftpServerResource.Download(SampleFileName, configuration.Directory);

            downloadedFile.Should().BeEquivalentTo(localFileContent);
        }
Ejemplo n.º 2
0
 public SFtpServerStatus(SFtpServerConfiguration ftpServerConfiguration)
 {
     _ftpServerConfiguration = ftpServerConfiguration;
 }