コード例 #1
0
 public ICondition WasDeleted()
 {
     return(new DelegatingCondition(() => {
         bool oldExists = fs.FileExists(folderName);
         if (oldExists)
         {
             return EvaluationResult.Error(FolderMessages.NotDeleted(folderName));
         }
         return EvaluationResult.OK;
     }));
 }
コード例 #2
0
 public ICondition DeletedCreated()
 {
     return(new DelegatingCondition(() => {
         var results = new MultiEvaluationResult();
         foreach (var name in names)
         {
             if (fileSystem.DirectoryExists(name))
             {
                 results.add(EvaluationResult.Error(FolderMessages.NotDeleted(name)));
             }
         }
         return results;
     }));
 }