private void RunsEachTest(ResultCollector collector) { foreach (MethodInfo test in testList) { try { this.before.ProtectedInvoke(this); collector.Start(test); test.Invoke(this, null); collector.AddSuccess(test); this.after.ProtectedInvoke(this); } catch (TargetInvocationException e) { if (e.InnerException is AssertionFailedException) { collector.AddFailure(test, e); } else { collector.AddError(test, e); } } } }
public override void Run(ResultCollector collector) { foreach (Unit unit in unitChildren) { unit.Run(collector); } }
public override void Run(ResultCollector collector) { this.setUp.ProtectedInvoke(this); this.RunsEachTest(collector); this.tearDwon.ProtectedInvoke(this); }