コード例 #1
0
        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);
        }
コード例 #2
0
 public override void VisitRowStart(RowProxy row)
 {
     this.builder.AppendLine("<Row>");
 }
コード例 #3
0
 public override void VisitRowEnd(RowProxy row)
 {
     this.builder.AppendLine("</Row>");
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 public RowProxyFacts()
 {
     this.testee = new RowProxy();
 }