public void TestAddEleString() { Footer2004 ft = new Footer2004(); ft.AddEle("<w:t>p1</w:t>"); Assert.AreEqual(2, TestUtils.RegexCount(ft.Content, "<*w:ftr")); Assert.AreEqual(1, TestUtils.RegexCount(ft.Content, "<w:t>p1</w:t>")); }
public void TestFooterWithNoPageNumber() { Footer2004 ft = new Footer2004(); ft.AddEle(Paragraph.With("p1")); Assert.AreEqual(2, TestUtils.RegexCount(ft.Content, "<*w:ftr")); Assert.AreEqual(1, TestUtils.RegexCount(ft.Content, "<w:t>p1</w:t>")); Assert.AreEqual(0, TestUtils.RegexCount(ft.Content, "<w:rStyle w:val=\"PageNumber\"/>")); }