public ICondition WasDeleted() { return(new DelegatingCondition(() => { bool oldExists = fs.FileExists(fileName); if (oldExists) { return EvaluationResult.Error(FileMessages.NotDeleted(fileName)); } return EvaluationResult.OK; })); }
public ICondition DeletedCreated() { return(new DelegatingCondition(() => { var results = new MultiEvaluationResult(); foreach (var name in names) { if (fileSystem.FileExists(name)) { results.add(EvaluationResult.Error(FileMessages.NotDeleted(name))); } } return results; })); }