Example #1
0
        //public static void ExecuteStep( Action stepMethod, Func<bool> goNogoMethod )
        //{
        //    if ( goNogoMethod() )
        //    {
        //        var runStorer = new DbfRunStorer();
        //        ExecuteStep( stepMethod, runStorer );
        //    }
        //    else
        //        Announce( string.Format( "{0} skipped.", stepMethod.Method.Name ), 0 );
        //}

        public static void ExecuteStep(Action stepMethod, IRunStorer runStorer)
        {
            Announce(string.Format("---- {0} --------------------------------", stepMethod.Method.Name), 0);
            var stopwatch = new Stopwatch();

            stopwatch.Start();
            Announce(string.Format("{0} ...", stepMethod.Method.Name), 0);
            stepMethod.Invoke();
            var ts = StopTheWatch(stopwatch, string.Format("Finished: {0}", stepMethod.Method.Name));

            Announce("============================================", 0);
            if (runStorer != null)
            {
                runStorer.StoreRun(stepMethod.Method.Name, ts);
            }
        }
Example #2
0
 //public static void ExecuteStep( Action stepMethod, Func<bool> goNogoMethod )
 //{
 //    if ( goNogoMethod() )
 //    {
 //        var runStorer = new DbfRunStorer();
 //        ExecuteStep( stepMethod, runStorer );
 //    }
 //    else
 //        Announce( string.Format( "{0} skipped.", stepMethod.Method.Name ), 0 );
 //}
 public static void ExecuteStep(Action stepMethod, IRunStorer runStorer)
 {
     Announce(string.Format("---- {0} --------------------------------", stepMethod.Method.Name), 0);
      var stopwatch = new Stopwatch();
      stopwatch.Start();
      Announce(string.Format("{0} ...", stepMethod.Method.Name), 0);
      stepMethod.Invoke();
      var ts = StopTheWatch(stopwatch, string.Format("Finished: {0}", stepMethod.Method.Name));
      Announce("============================================", 0);
      if (runStorer != null)
     runStorer.StoreRun(stepMethod.Method.Name, ts);
 }