Exemple #1
0
        public void TestSetGetVBorders()
        {
            // create a table
            XWPFDocument doc     = new XWPFDocument();
            CT_Tbl       ctTable = new CT_Tbl();
            XWPFTable    table   = new XWPFTable(ctTable, doc);

            // Set inside vertical border
            table.SetInsideVBorder(NPOI.XWPF.UserModel.XWPFTable.XWPFBorderType.DOUBLE, 4, 0, "00FF00");
            // Get inside vertical border components
            NPOI.XWPF.UserModel.XWPFTable.XWPFBorderType bt = table.GetInsideVBorderType();
            Assert.AreEqual(NPOI.XWPF.UserModel.XWPFTable.XWPFBorderType.DOUBLE, bt);
            int sz = table.GetInsideVBorderSize();

            Assert.AreEqual(4, sz);
            int sp = table.GetInsideVBorderSpace();

            Assert.AreEqual(0, sp);
            String clr = table.GetInsideVBorderColor();

            Assert.AreEqual("00FF00", clr);
        }
Exemple #2
0
 public void TestSetGetVBorders()
 {
     // create a table
     XWPFDocument doc = new XWPFDocument();
     CT_Tbl ctTable = new CT_Tbl();
     XWPFTable table = new XWPFTable(ctTable, doc);
     // Set inside vertical border
     table.SetInsideVBorder(NPOI.XWPF.UserModel.XWPFTable.XWPFBorderType.DOUBLE, 4, 0, "00FF00");
     // Get inside vertical border components
     NPOI.XWPF.UserModel.XWPFTable.XWPFBorderType bt = table.GetInsideVBorderType();
     Assert.AreEqual(NPOI.XWPF.UserModel.XWPFTable.XWPFBorderType.DOUBLE, bt);
     int sz = table.GetInsideVBorderSize();
     Assert.AreEqual(4, sz);
     int sp = table.GetInsideVBorderSpace();
     Assert.AreEqual(0, sp);
     String clr = table.GetInsideVBorderColor();
     Assert.AreEqual("00FF00", clr);
 }