public void ReturnsMethodValue() { var processor = Builder.CellProcessor(); var interpreter = new DefaultFlowInterpreter(new SampleClass()); processor.CallStack.DomainAdapter = new TypedValue(interpreter); Assert.AreEqual("samplereturn", new ValuePhrase(new CellTree("keyword", "methodnoparms")).Evaluate(processor)); }
static void Evaluate(Tree<Cell> rowTree, object systemUnderTest) { var interpreter = new DefaultFlowInterpreter(systemUnderTest); var row = new FlowRow(rowTree); var processor = Builder.CellProcessor(); processor.AddOperator(new TestInvokeSpecialAction(), 2); row.Evaluate(processor, interpreter); }
void InterpretTables(Tree<Cell> theTables) { processor.TestStatus.TableCount = 1; flowFixture = new DefaultFlowInterpreter(null); foreach (var table in theTables.Branches) { try { try { InterpretTable(table); } catch (System.Exception e) { processor.TestStatus.MarkException(table.ValueAt(0, 0), e); } } catch (System.Exception e) { if (!typeof(AbandonException).IsAssignableFrom(e.GetType())) throw; } writer.WriteTable(table); processor.TestStatus.TableCount++; } flowFixture.DoTearDown(theTables.Branches[0]); }