public void UnzipMixingFromAllFilesWhereZipsContainsSameFileInfo() { //Arrange var steps = new FileOpsBuilder() .AddConfiguration(_settingsUnzipFromMultipleZips) .AddConfiguration(_sharedSettings) .Build(); IFileOpsManager fileOpsManager = new FileOps.Pipe.FileOpsManager(steps, "identifier"); //Act fileOpsManager.Execute(); }
public void UnzipZeroItemsFromOneFile() { //Arrange var steps = new FileOpsBuilder() .AddConfiguration(_settingsUnzipZeroFile) .AddConfiguration(_sharedSettings) .Build(); IFileOpsManager fileOpsManager = new FileOps.Pipe.FileOpsManager(steps, "identifier"); //Act fileOpsManager.Execute(); //Assert FileProvider.Sftp.ToSettings.CopyContentTo(_workingDirectory); Assert.AreEqual(0, _workingDirectory.GetFiles().Length); }
public void UnzipFromEmptyFolder() { //Arrange var steps = new FileOpsBuilder() .AddConfiguration(_settingsUnzipEmptyfolder) .AddConfiguration(_sharedSettings) .Build(); IFileOpsManager fileOpsManager = new FileOps.Pipe.FileOpsManager(steps, "identifier"); //Act fileOpsManager.Execute(); //Assert Assert.AreEqual(0, _workingDirectory.GetFiles().Length); }
public void UnzipSucessfullyFromSftp() { //Arrange var steps = new FileOpsBuilder() .AddConfiguration(_unzipMultipleFiles) .AddConfiguration(_sharedSettings) .Build(); IFileOpsManager fileOpsManager = new FileOps.Pipe.FileOpsManager(steps, "identifier"); //Act fileOpsManager.Execute(); //Assert FileProvider.Sftp.ToSettings.CopyContentTo(_workingDirectory); Assert.AreEqual(2, _workingDirectory.GetFiles().Length); Assert.IsTrue(File.Exists(_testFile1.FullName)); Assert.IsTrue(File.Exists(_testFile2.FullName)); }
public void UnzipMixingFromAllFilesWhereZipsDoesntContainSameFileInfo() { //Arrange var steps = new FileOpsBuilder() .AddConfiguration(_settingsUnzipFromMultipleZips) .AddConfiguration(_sharedSettings) .Build(); FileProvider.Sftp.FromSettings.DeleteOneFile(_twoFilesInsideOneZip); IFileOpsManager fileOpsManager = new FileOps.Pipe.FileOpsManager(steps, "identifier"); //Act fileOpsManager.Execute(); //Assert FileProvider.Sftp.ToSettings.CopyContentTo(_workingDirectory); Assert.AreEqual(3, _workingDirectory.GetFiles().Length); Assert.IsTrue(File.Exists(_testFile1.FullName)); Assert.IsTrue(File.Exists(Path.Combine(_workingDirectory.FullName, "ClientInput2.csv"))); Assert.IsTrue(File.Exists(Path.Combine(_workingDirectory.FullName, "ClientInput1.csv"))); }