//[Fact] public void record_and_save_file() { var data = new ClientData(); var library = TestingContext.Library; var hierarchy = TestingContext.Hierarchy; hierarchy.GetAllSpecs().Each(x => x.path.ShouldNotBeNull()); hierarchy.GetAllSpecs().Each(spec => { data.specs.Add(spec.id, spec); using (var execution = theSystem.CreateContext()) { var observer = new RecordingObserver(data.results); using (var context = new SpecContext(spec, null, observer, new StopConditions(), execution) ) { context.Reporting.As <Reporting>().StartDebugListening(); var plan = spec.CreatePlan(library); var gatherer = new LineStepGatherer(context); plan.AcceptVisitor(gatherer); foreach (var line in gatherer.Lines) { line.Execute(context); } observer.SpecExecutionFinished(spec, context.FinalizeResults(1)); } } }); data.specs.Values.Each(x => x.path.ShouldNotBeNull()); data.hierarchy = hierarchy; data.fixtures = library.Models.Where(x => x.implementation.Contains("StoryTeller.Samples")).ToArray(); var json = JsonSerialization.ToIndentedJson(data); var clientPath = TestingContext.FindClientFolder(); new FileSystem().WriteStringToFile(clientPath.AppendPath("all-spec-data.js"), "module.exports = " + json); Debug.WriteLine("Wrote file to all-spec-data.js"); }
public async Task can_successfully_start_up_and_get_to_system_recycled() { var project = new Project { ProjectPath = TestingContext.FindParallelDirectory("Storyteller.Gallery") }; var system = new NulloSystem(); var controller = new RemoteController(project, new LocalLauncher(project, system)); var recycled = await controller.Start(); recycled.ShouldNotBeNull(); controller.Teardown(); }