Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for HTML fragments in Document Assembler Content tag #86

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
11 changes: 3 additions & 8 deletions Clippit.Tests/Word/DocumentAssemblerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public DocumentAssemblerTests(ITestOutputHelper log)
[InlineData("DA285-ImageSelectNoParagraphFollowedAfterMetadata.docx", "DA-Data-WithImages.xml", true)]
[InlineData("DA285A-ImageSelectNoParagraphFollowedAfterMetadata.docx", "DA-Data-WithImages.xml", true)]
[InlineData("DA-I0038-TemplateWithMultipleXPathResults.docx", "DA-I0038-Data.xml", false)]
[InlineData("DA289-html-formatting.docx", "DA-html-formatting.xml", false)]
public void DA101(string name, string data, bool err)
{
var templateDocx = new FileInfo(Path.Combine(_sourceDir.FullName, name));
Expand Down Expand Up @@ -185,14 +186,8 @@ public void DA259(string name, string data, bool err)
Path.Combine(TempDir, name.Replace(".docx", "-processed-by-DocumentAssembler.docx"))
);
var afterAssembling = new WmlDocument(assembledDocx.FullName);
var brCount = afterAssembling
.MainDocumentPart.Element(W.body)
.Elements(W.p)
.ElementAt(1)
.Elements(W.r)
.Elements(W.br)
.Count();
Assert.Equal(4, brCount);
var brCount = afterAssembling.MainDocumentPart.Element(W.body).Elements(W.p).Count();
Assert.Equal(6, brCount);
}

[Theory]
Expand Down
Loading
Loading