Example #1
0
        public void ShouldTrackExceptionsAsFailureReasons()
        {
            var exceptionA = new InvalidOperationException();
            var exceptionB = new DivideByZeroException();

            execution.Exceptions.ShouldBeEmpty();
            execution.Fail(exceptionA);
            execution.Fail(exceptionB);
            execution.Exceptions.ShouldEqual(exceptionA, exceptionB);
        }
 public void Execute(CaseExecution caseExecution, object instance)
 {
     try
     {
         outer(caseExecution, instance, () => inner.Execute(caseExecution, instance));
     }
     catch (Exception exception)
     {
         caseExecution.Fail(exception);
     }
 }
Example #3
0
 public void Execute(CaseExecution caseExecution, object instance)
 {
     try
     {
         outer(caseExecution, instance, () => inner.Execute(caseExecution, instance));
     }
     catch (Exception exception)
     {
         caseExecution.Fail(exception);
     }
 }