예제 #1
0
        public void TestPerformArchiveAndZip()
        {
            const string ZipFilename = @"c:\temp\Stf\StfArchiver.zip";

            if (File.Exists(ZipFilename))
            {
                File.Delete(ZipFilename);
            }

            MyAssert.FileNotExists("Deleted file should not exist", ZipFilename);

            MyArchiver.Configuration.ZipFilename = ZipFilename;
            MyArchiver.Configuration.DoArchiveFoldersAndFiles = false;
            MyArchiver.Configuration.DoArchiveToZipfile       = true;

            MyArchiver.AddDirectory(@"C:\Temp\Stf\Config");
            MyArchiver.PerformArchive();
            MyAssert.FileExists("Zip file should exist", ZipFilename);
        }