public void HasRowsInAddedOrder() { var firstRow = new RowProxy(); var secondRow = new RowProxy(); this.testee.Add(firstRow); this.testee.Add(secondRow); this.testee.Rows.Should().ContainInOrder(firstRow, secondRow); }
public override void VisitRowStart(RowProxy row) { this.builder.AppendLine("<Row>"); }
public override void VisitRowEnd(RowProxy row) { this.builder.AppendLine("</Row>"); }
public void AddsCellsToRow_WhenStartVisitingFromTable() { Table table = CreateDocumentWithTables(1, 1, 2).FirstSection.Body.Tables[0]; var rowProxy = new RowProxy(); var firstCellProxy = A.Fake<CellProxy>(); var secondCellProxy = A.Fake<CellProxy>(); A.CallTo(() => this.proxyFactory.CreateRow()).Returns(rowProxy); A.CallTo(() => this.proxyFactory.CreateCell()).ReturnsNextFromSequence(firstCellProxy, secondCellProxy); table.Accept(this.testee); rowProxy.Cells.Should().HaveCount(2) .And.ContainInOrder(firstCellProxy, secondCellProxy); }
public RowProxyFacts() { this.testee = new RowProxy(); }