package org.apache.poi.xwpf.usermodel;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
}
}
+ @Test
+ public void testRemoveCell() throws IOException {
+ XWPFDocument doc = new XWPFDocument();
+ XWPFTableRow tr = doc.createTable(1, 1).createRow();
+
+ assertEquals(1, tr.getTableCells().size());
+ assertEquals(tr.getTableCells().size(), tr.getCtRow().sizeOfTcArray());
+
+ tr.removeCell(0);
+ assertEquals(0, tr.getTableCells().size());
+ assertEquals(tr.getTableCells().size(), tr.getCtRow().sizeOfTcArray());
+ doc.close();
+ }
+
@Test
public void testBug62174() throws IOException {
try (XWPFDocument doc = XWPFTestDataSamples