public void Should_ListOnliZipeFile() { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); IntrumFile.DeleteFileIfExit(ZipfullPath); IntrumFile.CopyFileFromDirectoryTo(ZipfullPath3, ZipfullPath); var actual = IntrumFile.CreateDoubleZipFileContent(ZipPath1, ZipfullPath.Replace(".txt", ""), "123456"); var sut = IntrumFile.GetFilesInDirectory(ZipPath1, @"*.zip"); Assert.AreEqual(1, sut.Length); Assert.Contains(actual, sut); }
public void Should_DeliteAllFiles() { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); IntrumFile.DeleteFileIfExit(ZipfullPath); IntrumFile.CopyFileFromDirectoryTo(ZipfullPath3, ZipfullPath); var actual = IntrumFile.CreateDoubleZipFileContent(ZipPath1, ZipfullPath.Replace(".txt", ""), "123456"); var list = IntrumFile.GetFilesInDirectory(ZipPath1, @"*.zip"); foreach (var item in list) { IntrumFile.DeleteFileIfExit(item); } var sut = IntrumFile.GetFilesInDirectory(ZipPath1, @"*.zip"); Assert.AreEqual(0, sut.Length); Assert.IsEmpty(sut); }
public void Should_MoveFileZipeToEnviadosEndCleanFolder() { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); IntrumFile.DeleteFileIfExit(ZipfullPath); IntrumFile.CopyFileFromDirectoryTo(ZipfullPath3, ZipfullPath); IntrumFile.MoveFileFromDirectory(ZipfullPath3, ZipfullPath); var actual = IntrumFile.CreateDoubleZipFileContent(ZipPath1, null, "123456"); var name = actual.Split('\\').Last(); IntrumFile.MoveFileFromDirectory(actual, FILETestepathzip + name); IntrumFile.DeleteFileIfExit(ZipfullPath); var sut = IntrumFile.GetFilesInDirectory(FILETestepathzip, @"*.zip"); var acutualPath = IntrumFile.GetFilesInDirectory(ZipPath1); Assert.AreEqual(1, sut.Length); Assert.AreEqual(0, acutualPath.Length); Assert.IsEmpty(acutualPath); IntrumFile.DeleteFileIfExit(FILETestepathzip); }