コード例 #1
0
 public ICondition WasCreated()
 {
     return(new DelegatingCondition(() => {
         bool fileExists = fs.FileExists(fileName);
         if (!fileExists)
         {
             return EvaluationResult.Error(FileMessages.NotCreated(fileName));
         }
         return EvaluationResult.OK;
     }));
 }
コード例 #2
0
 public ICondition WereCreated()
 {
     return(new DelegatingCondition(() => {
         var results = new MultiEvaluationResult();
         foreach (var name in names)
         {
             if (!fileSystem.FileExists(name))
             {
                 results.add(EvaluationResult.Error(FileMessages.NotCreated(name)));
             }
         }
         return results;
     }));
 }