public void Should_CopyFile() { IntrumFile.DeleteFileIfExit(ZipfullPath); IntrumFile.CopyFileFromDirectoryTo(ZipfullPath3, ZipfullPath); var actual = 1; var getList = IntrumFile.GetFilesInDirectory(ZipPath1); Assert.AreEqual(actual, getList.Length); }
public void Should_DeleteFile_If_Exits() { IntrumFile.DeleteFileIfExit(ZipfullPath); IntrumFile.DeleteFileIfExit(ZipfullPath2); var actual = 0; var getList = IntrumFile.GetFilesInDirectory(ZipPath1); Assert.AreEqual(actual, getList.Length); }
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_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); }