[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 constraint = new ConstraintFixture {Processor = processor.Object}; processor.Setup(p => p.TestStatus).Returns(new TestStatus()); processor.Setup(o => o.Operate<ExecuteOperator>(constraint, 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"))) .Returns(new TypedValue(true)); constraint.DoTable(table); }
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 processor = new Mock<CellProcessor>(); var constraint = new ConstraintFixture {CellOperation = cellOperation.Object, Processor = processor.Object}; processor.Setup(p => p.TestStatus).Returns(new TestStatus()); cellOperation.Setup(o => o.TryInvoke(constraint, It.Is<Tree<Cell>>(c => c.Branches[0].Value.Text == "method"), It.Is<Tree<Cell>>(c => c.Branches[0].Value.Text == "value"), It.Is<Cell>(c => c.Text == "value"))) .Returns(new TypedValue(true)); constraint.DoTable(table); }