@Test public void testRemoveOnlyRow() { constructGridData(2, 1); for (int rowIndex = 0; rowIndex < gridData.getRowCount(); rowIndex++) { for (int columnIndex = 0; columnIndex < gridData.getColumnCount(); columnIndex++) { gridData.setCellValue(rowIndex, columnIndex, new BaseGridCellValue<String>("(" + columnIndex + ", " + rowIndex + ")")); } } assertGridIndexes(gridData, new boolean[]{false}, new boolean[]{false}, new Expected[][]{ {Expected.build(false, 1, "(0, 0)"), Expected.build(false, 1, "(1, 0)")} }); final GridData.Range rows = gridData.deleteRow(0); assertEquals(0, rows.getMinRowIndex()); assertEquals(0, rows.getMaxRowIndex()); assertEquals(0, gridData.getRowCount()); }
@Test public void testRemoveOnlyRow() { constructGridData(2, 1); for (int rowIndex = 0; rowIndex < gridData.getRowCount(); rowIndex++) { for (int columnIndex = 0; columnIndex < gridData.getColumnCount(); columnIndex++) { gridData.setCellValue(rowIndex, columnIndex, new BaseGridCellValue<String>("(" + columnIndex + ", " + rowIndex + ")")); } } assertGridIndexes(gridData, new boolean[]{false}, new boolean[]{false}, new Expected[][]{ {Expected.build(false, 1, "(0, 0)"), Expected.build(false, 1, "(1, 0)")} }); final GridData.Range rows = gridData.deleteRow(0); assertEquals(0, rows.getMinRowIndex()); assertEquals(0, rows.getMaxRowIndex()); assertEquals(0, gridData.getRowCount()); }