Exemplo n.º 1
0
 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);
             }
         }
     }
 }
Exemplo n.º 2
0
 public override void Run(ResultCollector collector)
 {
     foreach (Unit unit in unitChildren)
     {
         unit.Run(collector);
     }
 }
Exemplo n.º 3
0
 public override void Run(ResultCollector collector)
 {
     this.setUp.ProtectedInvoke(this);
     this.RunsEachTest(collector);
     this.tearDwon.ProtectedInvoke(this);
 }