Exemplo n.º 1
0
 public ICondition WasDeleted()
 {
     return(new DelegatingCondition(() => {
         bool oldExists = fs.FileExists(fileName);
         if (oldExists)
         {
             return EvaluationResult.Error(FileMessages.NotDeleted(fileName));
         }
         return EvaluationResult.OK;
     }));
 }
Exemplo n.º 2
0
 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;
     }));
 }