public void executing_the_table_grammar_will_execute_the_inner_grammar_for_each_child_row() { grammar.Execute(step); step.LeafFor("record").AllSteps().Each(childStep => { inner.AssertWasCalled(x => x.Execute(childStep, null), x => { x.Constraints(Is.Same(childStep), Is.Anything()); }); }); }
public void SetUp() { step = new Step(); StepLeaf leaf = step.LeafFor("record"); leaf.Add(new Step().With("a:1,b:2")); leaf.Add(new Step().With("a:3,b:4")); leaf.Add(new Step().With("a:5,b:6")); inner = new RecordingGrammar(); grammar = new TableGrammar(inner.As <IGrammarWithCells>(), "record") .Before(() => inner.Numbers.Add("0")) .After(() => inner.Numbers.Add("7")); grammar.LabelName = "some label"; grammar.Execute(step); }