public void Should_MoveFile() { IntrumFile.MoveFileFromDirectory(ZipfullPath3, ZipfullPath); var actual = 1; var getListTo = IntrumFile.GetFilesInDirectory(ZipPath1); var getListFrom = IntrumFile.GetFilesInDirectory(ZipPath3); Assert.IsNotNull(getListTo); Assert.IsNotEmpty(getListTo); Assert.AreEqual(0, getListFrom.Length); }
public void Should_CreateZipeFile() { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); IntrumFile.DeleteFileIfExit(ZipfullPath); IntrumFile.CopyFileFromDirectoryTo(ZipfullPath3, ZipfullPath); IntrumFile.MoveFileFromDirectory(ZipfullPath3, ZipfullPath); var actual = 1; var file = IntrumFile.CreateDoubleZipFileContent(ZipPath1, ZipfullPath.Replace(".txt", ""), "123456"); var sut = IntrumFile.GetFilesInDirectory(ZipPath1, @"*.zip"); Assert.AreEqual(actual, sut.Length); IntrumFile.DeleteFileIfExit(file); var sut2 = IntrumFile.GetFilesInDirectory(ZipPath1, @"*.zip"); Assert.AreEqual(0, sut2.Length); }
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); }