internal ScenarioRunner(Scenario scenario, CoreFactory factory) { this.scenario = scenario; this.factory = factory; stepExecutor = factory.CreateStepExecutor(scenario); statsCascader = factory.UtilityFactory.CreateStatsCascader(); }
internal ScenarioRunner(Scenario scenario, CoreFactory factory) { this.scenario = scenario; this.factory = factory; stepExecutor = factory.CreateStepExecutor(scenario); statsCascader = factory.UtilityFactory.CreateStatsCascader(); this.SetOutputWriter(new OutputWriter()); }
public void HandleException(StepExecutor stepExecutor, Step step, Exception ex) { if (ex is NotImplementedException) { ProcessNotImplementedException(stepExecutor, step, ex as NotImplementedException); } else { ProcessException(stepExecutor, step, ex); } }
void ProcessException(StepExecutor stepExecutor, Step step, Exception ex) { step.EndTime = DateTime.Now; step.Outcome = Outcome.Failed; step.Reason = ex.Message; step.Exception = ex; if (scenario.Reason == null) scenario.Reason = "Failed Step"; statsCascader.CascadeStats(step, false); throw new StepException(step.Name, ex); }
void ProcessNotImplementedException(StepExecutor stepExecutor, Step step, NotImplementedException ex) { step.EndTime = DateTime.Now; step.Outcome = Outcome.Failed; step.Reason = "Not Implemented"; step.Exception = ex; if (scenario.Reason == null) scenario.Reason = "Step Not Implemented"; statsCascader.CascadeStats(step, false); throw new StepNotImplementedException(step.Name, ex); }
void ProcessException(StepExecutor stepExecutor, Step step, Exception ex) { step.EndTime = DateTime.Now; step.Outcome = Outcome.Failed; step.Reason = "Failed"; step.Exception = ex; if (scenario.Reason == null) { scenario.Reason = "Failed"; } statsCascader.CascadeStepStats(step, false); throw new StepException(step.Name, ex); }
public void HandleException(StepExecutor stepExecutor, Step step, Exception ex) { if (ex is SkipStepException) { ProcessSkipException(stepExecutor, step, ex as SkipStepException); } else if (ex is NotImplementedException) { ProcessNotImplementedException(stepExecutor, step, ex as NotImplementedException); } else { ProcessException(stepExecutor, step, ex); } }