Exemple #1
0
        public void BackupCreatedWhenFileAlreadyExists()
        {
            File.WriteAllText(_testFilePath, "");
            _fileBackupCreator.CreateBackupFile(_testFilePath);
            var rollingBackupFiles = Directory.GetFiles(_testFileDirectory, _testFileRollingBackup);

            Assert.That(rollingBackupFiles.Length, Is.EqualTo(1));
        }
Exemple #2
0
 public override void Save(string content)
 {
     _fileBackupCreator.CreateBackupFile(FilePath);
     base.Save(content);
 }