public FeatureResults Run() { NBehaveInitializer.Initialize(configuration); actionCatalog = TinyIoCContainer.Current.Resolve <ActionCatalog>(); var featureRunner = TinyIoCContainer.Current.Resolve <IFeatureRunner>(); var context = TinyIoCContainer.Current.Resolve <IRunContext>(); var results = new FeatureResults(); try { context.RunStarted(); LoadAssemblies(); var loader = new LoadScenarioFiles(configuration); var files = loader.LoadFiles(); var parse = new ParseScenarioFiles(configuration); var features = parse.LoadFiles(files); results = Run(featureRunner, features, context); } finally { context.RunFinished(results); } return(results); }
private void RunStep(StringStep actionStep) { var info = ActionCatalog.GetAction(actionStep); if (actionStep is StringTableStep && !ShouldForEachOverStep(info)) { ForEachOverStep(actionStep as StringTableStep, info); } else { RunStep(info, () => ParameterConverter.GetParametersForStep(actionStep)); } }
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 ParameterConverter(ActionCatalog actionCatalog) { this.actionCatalog = actionCatalog; }
public StringStepRunner(ActionCatalog actionCatalog) { ActionCatalog = actionCatalog; ParameterConverter = new ParameterConverter(ActionCatalog); }
public ActionStepParser(StoryRunnerFilter storyRunnerFilter, ActionCatalog actionCatalog) { this.storyRunnerFilter = storyRunnerFilter; this.actionCatalog = actionCatalog; methodWithAttributeFinder = new MethodWithAttributeFinder(storyRunnerFilter); }