public void BackupCreatedWhenFileAlreadyExists() { File.WriteAllText(_testFilePath, ""); _fileBackupCreator.CreateBackupFile(_testFilePath); var rollingBackupFiles = Directory.GetFiles(_testFileDirectory, _testFileRollingBackup); Assert.That(rollingBackupFiles.Length, Is.EqualTo(1)); }
public override void Save(string content) { _fileBackupCreator.CreateBackupFile(FilePath); base.Save(content); }