Example #1
0
        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);
            }
        }
Example #2
0
 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);
 }
Example #3
0
 private void WriteFile(StoryTestString testResult, TestCounts counts)
 {
     WriteResult(testResult, counts, elapsedTime);
     resultWriter.WritePageResult(new PageResult(myPath.Name, testResult.ToString(), counts));
     handler(counts);
 }
Example #4
0
        private void ReportPageName(StoryPageName pageName, StoryTestString input, Action<StoryTestString, TestCounts> handleResults,
	                             Action handleNoTest)
        {
            myReporter.WriteLine(pageName.Name);
        }
Example #5
0
        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();
        }