The following test fails:
@Before public void setup() {
cell = new ListCell<String>();
model = FXCollections.observableArrayList("Apples", "Oranges", "Pears");
list = new ListView<String>(model);
}
@Test public void replaceItemsWithANull() {
cell.updateIndex(0);
cell.updateListView(list);
list.setItems(null);
assertNull(cell.getItem());
}
@Before public void setup() {
cell = new ListCell<String>();
model = FXCollections.observableArrayList("Apples", "Oranges", "Pears");
list = new ListView<String>(model);
}
@Test public void replaceItemsWithANull() {
cell.updateIndex(0);
cell.updateListView(list);
list.setItems(null);
assertNull(cell.getItem());
}