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); } }