Beispiel #1
0
 public void Run(StringStep step)
 {
     try
     {
         if (!ActionCatalog.ActionExists(step))
         {
             var pendReason = string.Format("No matching Action found for \"{0}\"", step);
             step.PendNotImplemented(pendReason);
         }
         else
         {
             RunStep(step);
         }
     }
     catch (Exception e)
     {
         var realException = FindUsefulException(e);
         step.Fail(realException);
     }
 }
Beispiel #2
0
 public void Run(StringStep step)
 {
     try
     {
         if (!ActionCatalog.ActionExists(step))
         {
             var pendReason = string.Format("No matching Action found for \"{0}\"", step);
             step.PendNotImplemented(pendReason);
         }
         else
         {
             RunStep(step);
         }
     }
     catch (Exception e)
     {
         var realException = FindUsefulException(e);
         step.Fail(realException);
     }
 }
Beispiel #3
0
        public void Run(StringStep step)
        {
            var stepImplementation = resolvers
                                     .Select(resolver => resolver.ResolveStep(step))
                                     .FirstOrDefault(action => action != null);

            if (stepImplementation == null)
            {
                step.PendNotImplemented("No implementation found");
                return;
            }

            try
            {
                stepImplementation();
            }
            catch (Exception ex)
            {
                var realException = FindUsefulException(ex);
                step.Fail(realException);
            }
        }