Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion OpenXmlPowerTools.Tests/DocumentAssemblerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,44 @@ public class DaTests
[InlineData("DA264-InvalidRunLevelRepeat.docx", "DA-Data.xml", true)]
[InlineData("DA265-RunLevelRepeatWithWhiteSpaceBefore.docx", "DA-Data.xml", false)]
[InlineData("DA266-RunLevelRepeat-NoData.docx", "DA-Data.xml", true)]

[InlineData("DA267-Repeat-HorizontalAlignType.docx", "DA-Data.xml", false)]
[InlineData("DA268-Repeat-VerticalAlignType.docx", "DA-Data.xml", false)]
[InlineData("DA269-Repeat-InvalidAlignType.docx", "DA-Data.xml", true)]
[InlineData("DA270-ImageSelect.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA270A-ImageSelect.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA271-ImageSelectWithRepeat.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA271A-ImageSelectWithRepeat.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA272-ImageSelectWithRepeatHorizontalAlign.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA272A-ImageSelectWithRepeatHorizontalAlign.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA273-ImageSelectInsideTextBoxWithRepeatVerticalAlign.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA273A-ImageSelectInsideTextBoxWithRepeatVerticalAlign.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA274-ImageSelectInsideTextBoxWithRepeatHorizontalAlign.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA274A-ImageSelectInsideTextBoxWithRepeatHorizontalAlign.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA275-ImageSelectWithRepeatInvalidAlign.docx", "DA-Data-WithImages.xml", true)]
[InlineData("DA275A-ImageSelectWithRepeatInvalidAlign.docx", "DA-Data-WithImages.xml", true)]
[InlineData("DA276-ImageSelectInsideTable.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA276A-ImageSelectInsideTable.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA277-ImageSelectMissingOrInvalidPictureContent.docx", "DA-Data-WithImages.xml", true)]
[InlineData("DA277A-ImageSelectMissingOrInvalidPictureContent.docx", "DA-Data-WithImages.xml", true)]
[InlineData("DA278-ImageSelect.docx", "DA-Data-WithImagesInvalidPath.xml", true)]
[InlineData("DA278A-ImageSelect.docx", "DA-Data-WithImagesInvalidPath.xml", true)]
[InlineData("DA279-ImageSelectWithRepeat.docx", "DA-Data-WithImagesInvalidMIMEType.xml", true)]
[InlineData("DA279A-ImageSelectWithRepeat.docx", "DA-Data-WithImagesInvalidMIMEType.xml", true)]
[InlineData("DA280-ImageSelectWithRepeat.docx", "DA-Data-WithImagesInvalidImageDataFormat.xml", true)]
[InlineData("DA280A-ImageSelectWithRepeat.docx", "DA-Data-WithImagesInvalidImageDataFormat.xml", true)]
[InlineData("DA281-ImageSelectExtraWhitespaceBeforeImageContent.docx", "DA-Data-WithImages.xml", true)]
[InlineData("DA281A-ImageSelectExtraWhitespaceBeforeImageContent.docx", "DA-Data-WithImages.xml", true)]
[InlineData("DA282-ImageSelectWithHeader.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA282A-ImageSelectWithHeader.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA282-ImageSelectWithHeader.docx", "DA-Data-WithImagesInvalidPath.xml", true)]
[InlineData("DA282A-ImageSelectWithHeader.docx", "DA-Data-WithImagesInvalidPath.xml", true)]
[InlineData("DA283-ImageSelectWithFooter.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA283A-ImageSelectWithFooter.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA284-ImageSelectWithHeaderAndFooter.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA284A-ImageSelectWithHeaderAndFooter.docx", "DA-Data-WithImages.xml", false)]
[InlineData("DA285-ImageSelectNoParagraphFollowedAfterMetadata.docx", "DA-Data-WithImages.xml", true)]
[InlineData("DA285A-ImageSelectNoParagraphFollowedAfterMetadata.docx", "DA-Data-WithImages.xml", true)]

public void DA101(string name, string data, bool err)
{
DirectoryInfo sourceDir = new DirectoryInfo("../../../../TestFiles/");
Expand Down
705 changes: 697 additions & 8 deletions OpenXmlPowerTools/DocumentAssembler.cs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions TestFiles/DA-Data-WithImages.xml

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions TestFiles/DA-Data-WithImagesInvalidImageDataFormat.xml

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions TestFiles/DA-Data-WithImagesInvalidMIMEType.xml

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions TestFiles/DA-Data-WithImagesInvalidPath.xml

Large diffs are not rendered by default.

Binary file added TestFiles/DA267-Repeat-HorizontalAlignType.docx
Binary file not shown.
Binary file added TestFiles/DA268-Repeat-VerticalAlignType.docx
Binary file not shown.
Binary file added TestFiles/DA269-Repeat-InvalidAlignType.docx
Binary file not shown.
Binary file added TestFiles/DA270-ImageSelect.docx
Binary file not shown.
Binary file added TestFiles/DA270A-ImageSelect.docx
Binary file not shown.
Binary file added TestFiles/DA271-ImageSelectWithRepeat.docx
Binary file not shown.
Binary file added TestFiles/DA271A-ImageSelectWithRepeat.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added TestFiles/DA276-ImageSelectInsideTable.docx
Binary file not shown.
Binary file added TestFiles/DA276A-ImageSelectInsideTable.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added TestFiles/DA278-ImageSelect.docx
Binary file not shown.
Binary file added TestFiles/DA278A-ImageSelect.docx
Binary file not shown.
Binary file added TestFiles/DA279-ImageSelectWithRepeat.docx
Binary file not shown.
Binary file added TestFiles/DA279A-ImageSelectWithRepeat.docx
Binary file not shown.
Binary file added TestFiles/DA280-ImageSelectWithRepeat.docx
Binary file not shown.
Binary file added TestFiles/DA280A-ImageSelectWithRepeat.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added TestFiles/DA282-ImageSelectWithHeader.docx
Binary file not shown.
Binary file added TestFiles/DA282A-ImageSelectWithHeader.docx
Binary file not shown.
Binary file added TestFiles/DA283-ImageSelectWithFooter.docx
Binary file not shown.
Binary file added TestFiles/DA283A-ImageSelectWithFooter.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.