SourceTreeTable extends TreeTableView<S> { public void updateEntry(S entry) { makeBranches(entry, false); } SourceTreeTable(); void updateEntry(S entry); void removeEntry(S entry); final SourceType getSourceType(); final ObjectProperty<SourceType> sourceTypeProperty(); final void setSourceType(SourceType sourceType); static final Comparator<TreeItem<? extends SourceEntry>> branchesFirst; static final Comparator<TreeItem<? extends SourceEntry>> alphabetical; }
@Test public void testUpdateFirstLevelEntry() { SourceEntry entry = sourceType.createSourceEntryForUri("firstLevel"); tree.updateEntry(entry); ObservableList<TreeItem<SourceEntry>> children = root.getChildren(); assertEquals(1, children.size(), "Should be 1 child"); TreeItem<SourceEntry> child = children.get(0); assertAll("", () -> { assertEquals("firstLevel", child.getValue().getName()); }); }