@Test public void testAttachListenerToPanelTitle() { setElementChain(); when(level1.getElementsByClassName(anyString())).thenReturn(getNodeList()); tested.attachListenerToPanelTitle(); verify(node, times(1)).addEventListener(anyString(), anyObject(), anyBoolean()); }
void attachListenerToPanelTitle() { final NodeList titleNodes = getParentInDepth(rootContainer, DEPTH).getElementsByClassName(PANEL_TITLE); for (int i = 0; i < titleNodes.getLength(); i++) { titleNodes.item(i) .addEventListener(EVENT_NAME, event -> presenter.onLanguageChanged(languageSelector.getValue()), false); } }
MonacoEditorView implements UberElement<MonacoEditorPresenter> { void attachListenerToPanelTitle() { final NodeList titleNodes = getParentInDepth(rootContainer, DEPTH).getElementsByClassName(PANEL_TITLE); for (int i = 0; i < titleNodes.getLength(); i++) { titleNodes.item(i) .addEventListener(EVENT_NAME, event -> presenter.onLanguageChanged(languageSelector.getValue()), false); } } }
MonacoEditorView implements UberElement<MonacoEditorPresenter> { void attachListenerToPanelTitle() { final NodeList titleNodes = getParentInDepth(rootContainer, DEPTH).getElementsByClassName(PANEL_TITLE); for (int i = 0; i < titleNodes.getLength(); i++) { titleNodes.item(i) .addEventListener(EVENT_NAME, event -> presenter.onLanguageChanged(languageSelector.getValue()), false); } }  }
MonacoEditorView implements UberElement<MonacoEditorPresenter> { void attachListenerToPanelTitle() { final NodeList titleNodes = getParentInDepth(rootContainer, DEPTH).getElementsByClassName(PANEL_TITLE); for (int i = 0; i < titleNodes.getLength(); i++) { titleNodes.item(i) .addEventListener(EVENT_NAME, event -> presenter.onLanguageChanged(languageSelector.getValue()), false); } }  @Override void init(final MonacoEditorPresenter presenter); String getValue(); String getLanguage(); void load(String[] modules,
                     MonacoEditorOptions options,
                     Runnable callback); void dispose(); @PreDestroy void destroy(); @Override HTMLElement getElement(); }
MonacoEditorView implements UberElement<MonacoEditorPresenter> { void attachListenerToPanelTitle() { final NodeList titleNodes = getParentInDepth(rootContainer, DEPTH).getElementsByClassName(PANEL_TITLE); for (int i = 0; i < titleNodes.getLength(); i++) { titleNodes.item(i) .addEventListener(EVENT_NAME, event -> presenter.onLanguageChanged(languageSelector.getValue()), false); } }  @Override void init(final MonacoEditorPresenter presenter); String getValue(); String getLanguage(); void load(String[] modules,
                     MonacoEditorOptions options,
                     Runnable callback); void dispose(); @PreDestroy void destroy(); @Override HTMLElement getElement();  }