public void TestSetGetMargins() { // instantiate the following class so it'll Get picked up by // the XmlBean process and Added to the jar file. it's required // for the following XWPFTable methods. CT_TblCellMar ctm = new CT_TblCellMar(); Assert.IsNotNull(ctm); // create a table XWPFDocument doc = new XWPFDocument(); CT_Tbl ctTable = new CT_Tbl(); XWPFTable table = new XWPFTable(ctTable, doc); // Set margins table.SetCellMargins(50, 50, 250, 450); // Get margin components int t = table.GetCellMarginTop(); Assert.AreEqual(50, t); int l = table.GetCellMarginLeft(); Assert.AreEqual(50, l); int b = table.GetCellMarginBottom(); Assert.AreEqual(250, b); int r = table.GetCellMarginRight(); Assert.AreEqual(450, r); }
public void TestSetGetMargins() { // instantiate the following class so it'll Get picked up by // the XmlBean process and Added to the jar file. it's required // for the following XWPFTable methods. CT_TblCellMar ctm = new CT_TblCellMar(); Assert.IsNotNull(ctm); // create a table XWPFDocument doc = new XWPFDocument(); CT_Tbl ctTable = new CT_Tbl(); XWPFTable table = new XWPFTable(ctTable, doc); // Set margins table.SetCellMargins(50, 50, 250, 450); // Get margin components int t = table.CellMarginTop; Assert.AreEqual(50, t); int l = table.CellMarginLeft; Assert.AreEqual(50, l); int b = table.CellMarginBottom; Assert.AreEqual(250, b); int r = table.CellMarginRight; Assert.AreEqual(450, r); }