상속: FlowInterpreter
예제 #1
0
 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));
 }
예제 #2
0
 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);
 }
예제 #3
0
            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]);
		    }