Example #1
0
        public void FailToDeleteFile()
        {
            string fn = @"i:\do\not\exist\asdfasdfasdf.asdf";

            Assert.IsFalse(File.Exists(fn), "Dummy file should not exist!");
            BackupFile bf = new BackupFile(fn);

            Assert.IsFalse(bf.Delete(), "BackupFile.Delete() should return false");
        }
Example #2
0
        public void DeleteFile()
        {
            string fn = Path.GetTempFileName();

            Assert.IsTrue(File.Exists(fn));
            BackupFile bf = new BackupFile(fn);

            Assert.IsTrue(bf.Delete(), "BackupFile.Delete() should return true");
            Assert.IsFalse(File.Exists(fn));
        }