[SetUp] public void SetUp() { processor = new CellProcessorBase(); processor.AddOperator(new TestParseInterpreter()); execute = new ExecuteStoryTest(processor, (t, c) => {}); tables = new CellTree(new CellTree(new CellTree("myfixture"))); }
private TypedValue Invoke(Parse procedure, TypedValue target, Tree <Cell> parameterValues) { var fixture = ExecuteStoryTest.MakeDefaultFlowInterpreter(Processor, target); var parameters = new Parameters(procedure.Parts, parameterValues); var body = procedure.Parts.More.Parts.Parts != null ? new CellTree(procedure.Parts.More.Parts.Parts.DeepCopy(parameters.Substitute, s => s.More, s => s.Parts).SiblingTrees) : new CellTree((Tree <Cell>)procedure.DeepCopy( parameters.Substitute, s => s == procedure ? null : s.More, s => s == procedure ? s.Parts.More : s.Parts)); Processor.TestStatus.PushReturn(TypedValue.Void); ExecuteProcedure(fixture, body); Processor.TestStatus.LastAction = Processor.ParseTree(typeof(StoryTestString), body).ValueString; return(Processor.TestStatus.PopReturn()); }
void ProcessRestOfTable(Interpreter theFixture, Parse theRestOfTheRows) { var restOfTable = new Parse("table", "", theRestOfTheRows, null); theFixture.Processor = Processor; var fixture = theFixture as Fixture; if (fixture != null) { fixture.Prepare(this, restOfTable); } try { ExecuteStoryTest.DoTable(restOfTable, theFixture, false); } catch (Exception e) { TestStatus.MarkException(theRestOfTheRows.Parts, e); } }