public SpecResults Execute(Specification specification) { var plan = specification.CreatePlan(_library); var timings = new Timings(); timings.Start(specification); IExecutionContext execution = null; using (timings.Subject("Context", "Creation")) { execution = _system.CreateContext(); } var context = new SpecContext(specification, timings, new NulloResultObserver(), StopConditions, execution); context.Reporting.As <Reporting>().StartDebugListening(); var executor = new SynchronousExecutor(context); plan.AcceptVisitor(executor); execution.Dispose(); context.Dispose(); return(context.FinalizeResults(1)); }
public void Cancel() { _context.Dispose(); _request.Cancel(); _wasCancelled = true; _thread.Abort(); }
public void Cancel() { _context.Dispose(); _request.Cancel(); _wasCancelled = true; #if NET46 _thread.Abort(); #endif _reset.Set(); }
public SpecResults Execute(Specification specification) { var plan = specification.CreatePlan(_library); var timings = new Timings(); timings.Start(specification); IExecutionContext execution = null; var record = timings.Subject("Context", "Creation", 0); try { execution = _system.CreateContext(); } finally { timings.End(record); } var context = new SpecContext(specification, timings, new NulloResultObserver(), StopConditions, execution); context.Reporting.As <Reporting>().StartDebugListening(); var gatherer = new LineStepGatherer(context); plan.AcceptVisitor(gatherer); foreach (var line in gatherer.Lines) { line.Execute(context); } execution.Dispose(); context.Dispose(); return(context.FinalizeResults(1)); }