@Test public void testItemIndex() { final DecisionNavigatorItem item = mock(DecisionNavigatorItem.class); final DecisionNavigatorItem child1 = mock(DecisionNavigatorItem.class); final DecisionNavigatorItem child2 = mock(DecisionNavigatorItem.class); final TreeSet<DecisionNavigatorItem> children = asTreeSet(child1, child2); final String uuid = "uuid"; when(item.getUUID()).thenReturn(uuid); when(item.getChildren()).thenReturn(children); presenter.index(item); verify(indexedItems).put(uuid, item); verify(presenter).index(children); }
void index(final Collection<DecisionNavigatorItem> items) { items.forEach(this::index); }
DecisionNavigatorTreePresenter { void index(final Collection<DecisionNavigatorItem> items) { items.forEach(this::index); } }
DecisionNavigatorTreePresenter { void index(final Collection<DecisionNavigatorItem> items) { items.forEach(this::index); } @Inject  DecisionNavigatorTreePresenter(final View view); }
DecisionNavigatorTreePresenter { void index(final Collection<DecisionNavigatorItem> items) { items.forEach(this::index); } @Inject  DecisionNavigatorTreePresenter(final View view); View getView(); void setupItems(final List<DecisionNavigatorItem> items); void removeAllItems(); DecisionNavigatorItem getActiveParent(); void setActiveParentUUID(final String activeParentUUID); void selectItem(final String uuid); void deselectItem(); }
DecisionNavigatorTreePresenter { void index(final Collection<DecisionNavigatorItem> items) { items.forEach(this::index); } @Inject  DecisionNavigatorTreePresenter(final View view); View getView(); void setupItems(final List<DecisionNavigatorItem> items); void removeAllItems(); DecisionNavigatorItem getActiveParent(); void setActiveParentUUID(final String activeParentUUID); void selectItem(final String uuid); void deselectItem();  }