@Test public void testSelect() { final String uuid = "uuid"; final Element newElement = mock(Element.class); final Element oldElement = mock(Element.class); final DOMTokenList newDomTokenList = mock(DOMTokenList.class); final DOMTokenList oldDomTokenList = mock(DOMTokenList.class); newElement.classList = newDomTokenList; oldElement.classList = oldDomTokenList; doReturn(newElement).when(treeView).findTreeItemTextElement(uuid); doReturn(oldElement).when(treeView).getSelectedElement(); treeView.select(uuid); verify(oldDomTokenList).remove("selected"); verify(newDomTokenList).add("selected"); verify(treeView).deselect(oldElement); verify(treeView).select(newElement); verify(treeView).setSelectedElement(newElement); }
@Override public void select(final String uuid) { final Element newElement = findTreeItemTextElement(uuid); final Element oldElement = getSelectedElement(); deselect(oldElement); select(newElement); setSelectedElement(newElement); }
DecisionNavigatorTreeView implements DecisionNavigatorTreePresenter.View { @Override public void select(final String uuid) { final Element newElement = findTreeItemTextElement(uuid); final Element oldElement = getSelectedElement(); deselect(oldElement); select(newElement); setSelectedElement(newElement); } }
DecisionNavigatorTreeView implements DecisionNavigatorTreePresenter.View { @Override public void select(final String uuid) { final Element newElement = findTreeItemTextElement(uuid); final Element oldElement = getSelectedElement(); deselect(oldElement); select(newElement); setSelectedElement(newElement); } @Inject  DecisionNavigatorTreeView(final HTMLDivElement view,
                                     final HTMLDivElement items,
                                     final ManagedInstance<TreeItem> managedInstance,
                                     final Elemental2DomUtil util); }
DecisionNavigatorTreeView implements DecisionNavigatorTreePresenter.View { @Override public void select(final String uuid) { final Element newElement = findTreeItemTextElement(uuid); final Element oldElement = getSelectedElement(); deselect(oldElement); select(newElement); setSelectedElement(newElement); } @Inject  DecisionNavigatorTreeView(final HTMLDivElement view,
                                     final HTMLDivElement items,
                                     final ManagedInstance<TreeItem> managedInstance,
                                     final Elemental2DomUtil util); @Override void init(final DecisionNavigatorTreePresenter presenter); @Override HTMLElement getElement(); @Override void clean(); @Override void setup(final List<DecisionNavigatorItem> items); @Override void select(final String uuid); @Override void deselect(); }
DecisionNavigatorTreeView implements DecisionNavigatorTreePresenter.View { @Override public void select(final String uuid) { final Element newElement = findTreeItemTextElement(uuid); final Element oldElement = getSelectedElement(); deselect(oldElement); select(newElement); setSelectedElement(newElement); } @Inject  DecisionNavigatorTreeView(final HTMLDivElement view,
                                     final HTMLDivElement items,
                                     final ManagedInstance<TreeItem> managedInstance,
                                     final Elemental2DomUtil util); @Override void init(final DecisionNavigatorTreePresenter presenter); @Override HTMLElement getElement(); @Override void clean(); @Override void setup(final List<DecisionNavigatorItem> items); @Override void select(final String uuid); @Override void deselect();  }