public void TestCreateFootnotes() { XWPFDocument docOut = new XWPFDocument(); XWPFFootnotes footnotes = docOut.CreateFootnotes(); Assert.IsNotNull(footnotes); XWPFFootnotes secondFootnotes = docOut.CreateFootnotes(); Assert.AreSame(footnotes, secondFootnotes); docOut.Close(); }
public void TestAddFootnotesToDocument() { XWPFDocument docOut = new XWPFDocument(); int noteId = 1; XWPFFootnotes footnotes = docOut.CreateFootnotes(); CT_FtnEdn ctNote = new CT_FtnEdn(); ctNote.id = (noteId.ToString()); ctNote.type = (ST_FtnEdn.normal); footnotes.AddFootnote(ctNote); XWPFDocument docIn = XWPFTestDataSamples.WriteOutAndReadBack(docOut); XWPFFootnote note = docIn.GetFootnoteByID(noteId); Assert.AreEqual(note.GetCTFtnEdn().type, ST_FtnEdn.normal); }