offset = cursor.findRegionForColumn(80, true).getHiddenSoFar();
assertEquals(46, offset);
}
-
- /**
- * Test the method which updates for a deleted region
- */
- @Test(groups = { "Functional" })
- public void testUpdateForDeletedRegion()
- {
- List<int[]> hlist = new ArrayList<>();
- HiddenColumnsCursor cursor = new HiddenColumnsCursor(hlist, 1, 5);
- cursor.updateForDeletedRegion(hlist, 0);
- assertNull(cursor.findRegionForColumn(30, false));
-
- hlist.add(new int[] { 3, 7 });
- hlist.add(new int[] { 15, 25 });
-
- cursor = new HiddenColumnsCursor(hlist, 1, 5);
-
- HiddenCursorPosition p = cursor.findRegionForColumn(30, false);
- assertEquals(16, p.getHiddenSoFar());
-
- List<int[]> hlist2 = new ArrayList<>();
- hlist2.add(new int[] { 3, 7 });
- cursor.updateForDeletedRegion(hlist2, 11);
- p = cursor.findRegionForColumn(30, false);
- assertEquals(5, p.getHiddenSoFar());
- }
-
}