private SpecificationEngine buildBatchedEngine(string tracingStyle) { IBatchObserver batchObserver = new BatchObserver(); IExecutionObserver executionObserver = new NulloObserver(); if ("TeamCity" == tracingStyle) { batchObserver = new TeamCityBatchObserver(batchObserver); executionObserver = new TeamCityExecutionObserver(); } if ("AppVeyor" == tracingStyle) { batchObserver = new AppVeyorBatchObserver(batchObserver); } var executionMode = new BatchExecutionMode(batchObserver); var runner = new SpecRunner(executionMode, _running.System, executionObserver); var engine = new SpecificationEngine( _running.System, runner, executionObserver); _controller = new BatchController(engine, batchObserver); _disposables.Add(engine); EventAggregator.Messaging.AddListener(_controller); return(engine); }
private static SpecRunner buildRunner(RunInput input, List <Specification> specs, RunningSystem running, out IExecutionObserver executionObserver) { IBatchObserver batchObserver = new NulloBatchObservor(); executionObserver = new NulloObserver(); switch (input.TracingFlag) { case TracingStyle.verbose: batchObserver = new ConsoleBatchObserver(specs.Count); // TODO -- awesome if you could get smarter w/ the console output here break; case TracingStyle.teamcity: batchObserver = new TeamCityBatchObserver(); executionObserver = new TeamCityExecutionObserver(); break; case TracingStyle.appveyor: batchObserver = new AppVeyorBatchObserver(); break; } var runner = new SpecRunner(new BatchExecutionMode(batchObserver), running.System, executionObserver); runner.UseStopConditions(Project.CurrentProject.StopConditions); return(runner); }