Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public void Execute(CaseExecution caseExecution, object instance)
 {
     try
     {
         outer(caseExecution, instance, () => inner.Execute(caseExecution, instance));
     }
     catch (Exception exception)
     {
         caseExecution.Fail(exception);
     }
 }
Exemplo n.º 3
0
 public void Execute(CaseExecution caseExecution, object instance)
 {
     try
     {
         outer(caseExecution, instance, () => inner.Execute(caseExecution, instance));
     }
     catch (Exception exception)
     {
         caseExecution.Fail(exception);
     }
 }