Skip to content

Commit

Permalink
Add test for merging lists
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Feb 18, 2024
1 parent 0f16c91 commit 46faee8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OfficeIMO.Tests/Word.Lists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ public void Test_CreatingWordDocumentWithLists() {
var section = Assert.Single(document.Sections);
Assert.Equal(45, section.Paragraphs.Count);

// we merge the first two lists
document.Lists[0].Merge(document.Lists[1]);

Assert.Equal(9, document.Lists.Count);
Assert.Equal(45, document.Paragraphs.Count);

document.Save();

Assert.True(HasUnexpectedElements(document) == false, "Document has unexpected elements. Order of elements matters!");
Expand Down

0 comments on commit 46faee8

Please sign in to comment.