[Test] public void MethodIsInvokedForEachRow() { Parse table = Parse.ParseFrom("<table><tr><td></td></tr><tr><td>method</td></tr><tr><td>value</td></tr></table>"); var cellOperation = new Mock <CellOperation>(); var setUp = new SetUpFixture { CellOperation = cellOperation.Object }; setUp.DoTable(table); cellOperation.Verify(o => o.TryInvoke(setUp, It.Is <Tree <Cell> >(c => c.Branches[0].Value.Text == "method"), It.Is <Tree <Cell> >(c => c.Branches[0].Value.Text == "value"), It.Is <Tree <Cell> >(c => c.Value.Text == "value"))); }
[Test] public void MethodIsInvokedForEachRow() { Parse table = Parse.ParseFrom("<table><tr><td></td></tr><tr><td>method</td></tr><tr><td>value</td></tr></table>"); var processor = new Mock <CellProcessor>(); var setUp = new SetUpFixture { Processor = processor.Object }; setUp.DoTable(table); processor.Verify(o => o.Operate <ExecuteOperator>(setUp, It.Is <Tree <Cell> >(c => c.ValueAt(0).Text == "method"), It.Is <Tree <Cell> >(c => c.ValueAt(0).Text == "value"), It.Is <Cell>(c => c.Text == "value"))); }