public override void VisitBodyStart(BodyProxy body) { this.builder.AppendLine("<Body>"); }
public override void VisitBodyEnd(BodyProxy body) { this.builder.AppendLine("</Body>"); }
public void AddsParagraphsToBody_WhenStartVisitingFromSection() { var builder = new DocumentBuilder(); builder.InsertParagraph(); Section section = builder.Document.FirstSection; var bodyProxy = new BodyProxy(); var firstParagraph = A.Fake<ParagraphProxy>(); var secondParagraph = A.Fake<ParagraphProxy>(); A.CallTo(() => this.proxyFactory.CreateBody()).Returns(bodyProxy); A.CallTo(() => this.proxyFactory.CreateParagraph()).ReturnsNextFromSequence(firstParagraph, secondParagraph); section.Accept(this.testee); bodyProxy.Children.Should().HaveCount(2) .And.ContainInOrder(firstParagraph, secondParagraph); }
public void AddsTablesToBody_WhenStartVisitingFromSection() { Section section = CreateDocumentWithTables(2, 1, 1).FirstSection; var bodyProxy = new BodyProxy(); var firstTableProxy = A.Fake<TableProxy>(); var secondTableProxy = A.Fake<TableProxy>(); A.CallTo(() => this.proxyFactory.CreateBody()).Returns(bodyProxy); A.CallTo(() => this.proxyFactory.CreateTable()).ReturnsNextFromSequence(firstTableProxy, secondTableProxy); section.Accept(this.testee); bodyProxy.Children.Should().ContainInOrder(firstTableProxy, secondTableProxy); }
public BodyProxyFacts() { this.testee = new BodyProxy(); }