public void PropertiesAppliedToBlockFieldShouldPersistAfterSettingContent() { using (var expected = new DocxDocument(Resources.WithStyledSdtElementsContentInserted)) using (var document = new DocxDocument(Resources.WithStyledSdtElements)) { var builder = new DocxDocumentBuilder(document); builder.BlockField("BlockField", x => x.Paragraph("Первый").Paragraph("Второй")); Assert.Equal(expected, document, new DocxDocumentEqualityComparer()); } }
public void CanSetContentToBlockFieldConsistingOfTwoParagraphs() { using (var expected = new DocxDocument(Resources.WithTwoParagraphsInBlockField)) using (var document = new DocxDocument(Resources.WithSdtElements)) { var builder = new DocxDocumentBuilder(document); builder.BlockField("BlockField", x => x.Paragraph("Первый").Paragraph("Второй")); Assert.Equal(expected, document, new DocxDocumentEqualityComparer()); } }