private void ExecutePage(StoryPageName pageName, StoryTestString input, Action<StoryTestString, TestCounts> handleResults, Action handleNoTest) { var service = new Service.Service(configuration); Tree<Cell> result = service.Compose(input); if (result == null) { handleNoTest(); return; } var storyTest = new StoryTest((Parse) result.Value, (tables, counts) => handleResults(service.ParseTree<Cell, StoryTestString>(tables), counts)); if (pageName.IsSuitePage) { storyTest.ExecuteOnConfiguration(configuration); } else { storyTest.Execute(configuration); } }
private void WriteResult(StoryTestString testResult, TestCounts counts, ElapsedTime elapsedTime) { string outputFile = OutputPath; var output = new StringWriter(); output.Write(testResult); output.Close(); myFolderModel.MakeFile(outputFile, output.ToString()); myFolder.ListFile(outputFile, counts, elapsedTime); }
private void WriteFile(StoryTestString testResult, TestCounts counts) { WriteResult(testResult, counts, elapsedTime); resultWriter.WritePageResult(new PageResult(myPath.Name, testResult.ToString(), counts)); handler(counts); }
private void ReportPageName(StoryPageName pageName, StoryTestString input, Action<StoryTestString, TestCounts> handleResults, Action handleNoTest) { myReporter.WriteLine(pageName.Name); }
private void ExecutePage(StoryTestString input, Action<StoryTestString, TestCounts> handleResults, Action handleNoTest) { var service = configuration.GetItem<Service.Service>(); FitVersionFixture.Reset(); Tree<Cell> result = service.Compose(input); if (result == null) { handleNoTest(); return; } new StoryTest((Parse) result.Value, (tables, counts) => handleResults(service.ParseTree<Cell, StoryTestString>(tables), counts)). Execute(); }