Beispiel #1
0
 public void ExecuteAfterEachActions(ExampleSpecResult specResult)
 {
     foreach (var each in afterEachActions)
     {
         try {
             each();
         }
         catch (Exception e) {
             specResult.ReportFailure(e);
         }
     }
 }
Beispiel #2
0
        public SpecResult Execute(ExecutionContext execContext)
        {
            var result = new ExampleSpecResult(message);

            execContext.ExecuteBeforeEachActions(result);
            try {
                exampleAction();
            }
            catch (Exception e) {
                result.ReportFailure(e);
            }
            execContext.ExecuteAfterEachActions(result);
            return(result);
        }