Exemple #1
0
        public void TestSetGetWidth()
        {
            XWPFDocument doc = new XWPFDocument();

            CT_Tbl table = new CT_Tbl();

            table.AddNewTblPr().AddNewTblW().w = "1000";

            XWPFTable xtab = new XWPFTable(table, doc);

            Assert.AreEqual(1000, xtab.GetWidth());

            xtab.SetWidth(100);
            Assert.AreEqual(100, int.Parse(table.tblPr.tblW.w));
        }
Exemple #2
0
        public void TestSetWidth()
        {
            XWPFDocument doc = new XWPFDocument();

            CT_Tbl table = new CT_Tbl();
            table.AddNewTblPr().AddNewTblW().w = "1000";

            XWPFTable xtab = new XWPFTable(table, doc);

            Assert.AreEqual(1000, xtab.GetWidth());

            xtab.SetWidth(100);
            Assert.AreEqual(100, int.Parse(table.tblPr.tblW.w));
        }