public void TestBasicHeadingStyle() { IDocument myDoc = new Document2004(); Heading1 h1 = new Heading1("Heading 111"); HeadingStyle headingStyle = new HeadingStyle(); headingStyle.Align(Align.CENTER); headingStyle.Italic(); h1.Style = headingStyle; myDoc.Body.AddEle(h1); myDoc.Body.AddEle(new Heading2("Heading 222")); myDoc.Body.AddEle(new Heading3("Heading 333")); }
public void SanityTest() { Heading1 heading1 = new Heading1("h111"); Assert.AreEqual(1, TestUtils.RegexCount(heading1.Template, "<w:p wsp:rsidR*")); Assert.AreEqual(1, TestUtils.RegexCount(heading1.Template, "<w:t>[{]value[}]</w:t>")); //it has to have the pace holder Assert.AreEqual(1, TestUtils.RegexCount(heading1.Template, "</w:p>")); Assert.AreEqual(1, TestUtils.RegexCount(heading1.Template, "<w:pStyle w:val=\"Heading1\" />")); // it has to replace the Type of Heading Assert.NotNull(heading1.Style); HeadingStyle style = new HeadingStyle(); heading1.Style = style; Assert.NotNull(heading1.Style); }
public void SanityTest() { HeadingStyle style = new HeadingStyle(); Assert.NotNull(style); }