-
Bug
-
Resolution: Duplicate
-
P4
-
8u20
-
win 7
here's a failing test (here simply copied from a bunch of selection-related tests in my github, just add to your own test - tableView with 5 items and everything in default state :-)
@Test
public void testClearSelectionAtIndex() {
int index = 2;
getSelectionModel().select(index);
getSelectionModel().clearSelection(index);
assertTrue("selection must be empty after unselect the selected",
getSelectionModel().isEmpty());
assertFalse("index must be unselected", getSelectionModel().isSelected(index));
assertEquals("index must be cleared",
-1, getSelectionModel().getSelectedIndex());
}
it fails (for both single and multiple selectionMode) at the last assert, somehow the selectedIndex property doesn't seem to get updated.
@Test
public void testClearSelectionAtIndex() {
int index = 2;
getSelectionModel().select(index);
getSelectionModel().clearSelection(index);
assertTrue("selection must be empty after unselect the selected",
getSelectionModel().isEmpty());
assertFalse("index must be unselected", getSelectionModel().isSelected(index));
assertEquals("index must be cleared",
-1, getSelectionModel().getSelectedIndex());
}
it fails (for both single and multiple selectionMode) at the last assert, somehow the selectedIndex property doesn't seem to get updated.