public void Run(CellProcessor processor, Tree <Cell> testTables, StoryTestWriter writer) { Assert.AreSame(parsedInput, testTables); parsedInput.Value.SetAttribute(CellAttribute.Body, result); writer.WriteTable(parsedInput); processor.TestStatus.MarkRight(testTables.Branches[0].Value); }
public TypedValue RunTest(Tree <Cell> testTables, StoryTestWriter writer) { Assert.AreSame(parsedInput, testTables); writer.WriteTable(parsedInput); Processor.TestStatus.MarkRight(testTables.Branches[0].Value); return(TypedValue.Void); }
private void ProcessTestDocument(string document, StoryTestWriter writer) { try { var storyTest = new StoryTest(service, writer) .WithInput(document) .OnAbandonSuite(() => { suiteIsAbandoned = true; }); reporter.WriteLine(storyTest.Leader); if (suiteSetupIdentifier.IsStartOf(storyTest.Leader) || IMaybeProcessingSuiteSetup) { storyTest.Execute(); } else { storyTest.Execute(new Service.Service(service)); } } catch (Exception e) { var testStatus = new TestStatus(); var parse = new CellBase(parseError, "div"); parse.SetAttribute(CellAttribute.Body, parseError); testStatus.MarkException(parse, e); writer.WriteTable(new CellTree(parse)); writer.WriteTest(new CellTree().AddBranchValue(parse), testStatus.Counts); } }
private void ProcessTestDocument(string document, StoryTestWriter writer) { try { Tree <Cell> result = service.Compose(new StoryTestString(document)); var parse = result != null ? (Parse)result.Value : null; var storyTest = new StoryTest(parse, writer); reporter.WriteLine(parse.Leader); if (suiteSetupIdentifier.IsStartOf(parse.Leader) || IMaybeProcessingSuiteSetup) { storyTest.ExecuteOnConfiguration(service.Configuration); } else { storyTest.Execute(service.Configuration); } } catch (Exception e) { var testStatus = new TestStatus(); var parse = new CellBase(parseError, "div"); parse.SetAttribute(CellAttribute.Body, parseError); testStatus.MarkException(parse, e); writer.WriteTable(new CellTree(parse)); writer.WriteTest(new CellTree().AddBranchValue(parse), testStatus.Counts); } }
public void ProcessTestDocuments(StoryTestWriter writer) { string document; while ((document = socket.ReceiveDocument()).Length > 0) { reporter.WriteLine("processing document of size: " + document.Length); ProcessTestDocument(document, writer); IMaybeProcessingSuiteSetup = false; } reporter.WriteLine("\ncompletion signal received"); }
public void ProcessTestDocuments(StoryTestWriter writer) { string document; while ((document = socket.ReceiveDocument()).Length > 0) { reporter.WriteLine("processing document of size: " + document.Length); ProcessTestDocument(document, writer); IMaybeProcessingSuiteSetup = false; } reporter.WriteLine("\ncompletion signal recieved"); }
public void ProcessTestDocuments(StoryTestWriter writer) { string document; while ((document = socket.ReceiveDocument()).Length > 0 && !suiteIsAbandoned) { reporter.WriteLine("processing document of size: " + document.Length); ProcessTestDocument(document, writer); IMaybeProcessingSuiteSetup = false; } reporter.WriteLine("\ncompletion signal received"); socket.Close(); if (suiteIsAbandoned) throw new AbandonSuiteException(); }
public void ProcessTestDocuments(StoryTestWriter writer) { string document; while ((document = socket.ReceiveDocument()).Length > 0 && !suiteIsAbandoned) { reporter.WriteLine("processing document of size: " + document.Length); ProcessTestDocument(document, writer); IMaybeProcessingSuiteSetup = false; } reporter.WriteLine("\ncompletion signal received"); socket.Close(); if (suiteIsAbandoned) { throw new AbandonSuiteException(); } }
private void ProcessTestDocument(string document, StoryTestWriter writer) { try { var storyTest = new StoryTest(service, writer) .WithInput(document) .OnAbandonSuite(() => { suiteIsAbandoned = true; }); reporter.WriteLine(storyTest.Leader); if (suiteSetupIdentifier.IsStartOf(storyTest.Leader) || IMaybeProcessingSuiteSetup) storyTest.Execute(); else storyTest.Execute(new Service.Service(service)); } catch (Exception e) { var testStatus = new TestStatus(); var parse = new CellBase(parseError, "div"); parse.SetAttribute(CellAttribute.Body, parseError ); testStatus.MarkException(parse, e); writer.WriteTable(new CellTree(parse)); writer.WriteTest(new CellTree().AddBranchValue(parse), testStatus.Counts); } }
private void ProcessTestDocument(string document, StoryTestWriter writer) { try { Tree<Cell> result = service.Compose(new StoryTestString(document)); var parse = result != null ? (Parse)result.Value : null; var storyTest = new StoryTest(parse, writer); reporter.WriteLine(parse.Leader); if (suiteSetupIdentifier.IsStartOf(parse.Leader) || IMaybeProcessingSuiteSetup) storyTest.ExecuteOnConfiguration(service.Configuration); else storyTest.Execute(service.Configuration); } catch (Exception e) { var testStatus = new TestStatus(); var parse = new CellBase(parseError, "div"); parse.SetAttribute(CellAttribute.Body, parseError ); testStatus.MarkException(parse, e); writer.WriteTable(new CellTree(parse)); writer.WriteTest(new CellTree().AddBranchValue(parse), testStatus.Counts); } }
public StoryTest() { writer = new StoryTestNullWriter(); }
public ExecuteStoryTest(CellProcessor processor, StoryTestWriter writer) { this.writer = writer; this.processor = processor; }
public void Run(CellProcessor processor, Tree <Cell> testTables, StoryTestWriter writer) { new ExecuteStoryTest(processor, writer).DoTables(testTables); }
public bool CanRunTest(Tree<Cell> testTables, StoryTestWriter writer) { return true; }
public TypedValue RunTest(Tree<Cell> testTables, StoryTestWriter writer) { new ExecuteStoryTest(Processor, writer).DoTables(testTables); return TypedValue.Void; }
public TypedValue RunTest(Tree <Cell> testTables, StoryTestWriter writer) { Assert.AreSame(parsedInput, testTables); writer.WriteTable(parsedInput); return(TypedValue.Void); }
public TypedValue RunTest(Tree <Cell> testTables, StoryTestWriter writer) { new ExecuteStoryTest(Processor, writer).DoTables(testTables); return(TypedValue.Void); }
public bool CanRunTest(Tree <Cell> testTables, StoryTestWriter writer) { return(true); }
public StoryTest(Parse theTables, StoryTestWriter writer) : this(theTables) { this.writer = writer; }
public StoryTest() { writer = new StoryTestNullWriter(); }
public StoryTest(Parse theTables, StoryTestWriter writer) : this(theTables) { this.writer = writer; }
public StoryTest(CellProcessor processor, StoryTestWriter writer) { this.processor = processor; this.writer = writer; }