private IList <ILineExecution> determineLineSteps(SpecContext context) { var gatherer = new LineStepGatherer(context); Request.Plan.AcceptVisitor(gatherer); return(gatherer.Lines); }
public static void RunAll(SpecContext context, SpecificationPlan plan) { var gatherer = new LineStepGatherer(context); plan.AcceptVisitor(gatherer); foreach (var line in gatherer.Lines) { if (!context.CanContinue()) break; line.Execute(context); } }
public void can_gather_up_the_lines() { var gatherer = new LineStepGatherer(Execution.Context); var plan = Specification.CreatePlan(TestingContext.Library); plan.AcceptVisitor(gatherer); gatherer.Lines.Count.ShouldBe(7); gatherer.Lines[0].ShouldBeOfType<SilentAction>(); gatherer.Lines[1].ShouldBeOfType<LineStep>(); gatherer.Lines[2].ShouldBeOfType<LineStep>(); gatherer.Lines[3].ShouldBeOfType<LineStep>(); gatherer.Lines[4].ShouldBeOfType<LineStep>(); gatherer.Lines[5].ShouldBeOfType<LineStep>(); gatherer.Lines.Last().ShouldBeOfType<SilentAction>(); }
public static IEnumerable <PerfRecord> RunAll(SpecContext context, SpecificationPlan plan) { var gatherer = new LineStepGatherer(context); plan.AcceptVisitor(gatherer); context.Timings.Start(plan.Specification); foreach (var line in gatherer.Lines) { if (!context.CanContinue()) { break; } line.Execute(context); } return(context.FinalizeResults(1).Performance); }
private IList<ILineExecution> determineLineSteps(SpecContext context) { var gatherer = new LineStepGatherer(context); Request.Plan.AcceptVisitor(gatherer); return gatherer.Lines; }