Example #1
0
        public void TestAddFootnoteRefToParagraph()
        {
            XWPFParagraph p    = docOut.CreateParagraph();
            var           runs = p.Runs;

            Assert.AreEqual(0, runs.Count, "Expected no runs in new paragraph");
            p.AddFootnoteReference(footnote);
            XWPFRun run = p.Runs[0];
            CT_R    ctr = run.GetCTR();

            Assert.IsNotNull(run, "Expected a run");
            CT_FtnEdnRef ref1 = ctr.GetFootnoteReferenceList()[0];

            Assert.IsNotNull(ref1);
            Assert.AreEqual(footnote.Id.ToString(), ref1.id, "Footnote ID and reference ID did not match");
        }