private void WriteResult(StoryTestString testResult, TestCounts counts) { string outputFile = Path.Combine(myFolder.OutputPath, myPath.OutputFileName); var output = new StringWriter(); output.Write(testResult); output.Close(); myFolderModel.MakeFile(outputFile, output.ToString()); myFolder.ListFile(outputFile, counts, elapsedTime); }
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 || result.Branches.Count == 0) { handleNoTest(); return; } var storyTest = new StoryTest((Parse)result, (tables, counts) => handleResults(service.ParseTree <Cell, StoryTestString>(tables), counts)); if (pageName.IsSuitePage) { storyTest.ExecuteOnConfiguration(configuration); } else { storyTest.Execute(configuration); } }
private void WriteFile(StoryTestString testResult, TestCounts counts) { WriteResult(testResult, counts); resultWriter.WritePageResult(new PageResult(myPath.Name, testResult.ToString(), counts)); handler(counts); }