Esempio n. 1
0
        public void TestCreateFootnotes()
        {
            XWPFDocument  docOut    = new XWPFDocument();
            XWPFFootnotes footnotes = docOut.CreateFootnotes();

            Assert.IsNotNull(footnotes);
            XWPFFootnotes secondFootnotes = docOut.CreateFootnotes();

            Assert.AreSame(footnotes, secondFootnotes);
            docOut.Close();
        }
Esempio n. 2
0
        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);
        }