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