@Test public void testScrollTo() { final Element element = mock(Element.class); final HTMLElement container = mock(HTMLElement.class); final DataTypeList dataTypeList = mock(DataTypeList.class); when(presenter.getDataTypeList()).thenReturn(dataTypeList); when(dataTypeList.getListItems()).thenReturn(container); view.scrollTo(element); verify(scrollHelper).scrollTo(element, container, 20); }
void scrollTo(final Element target) { final int padding = 20; final HTMLElement container = getDataTypeList().getListItems(); scrollHelper.scrollTo(target, container, padding); }
DataTypeListShortcutsView implements DataTypeListShortcuts.View { void scrollTo(final Element target) { final int padding = 20; final HTMLElement container = getDataTypeList().getListItems(); scrollHelper.scrollTo(target, container, padding); } }
DataTypeListShortcutsView implements DataTypeListShortcuts.View { void scrollTo(final Element target) { final int padding = 20; final HTMLElement container = getDataTypeList().getListItems(); scrollHelper.scrollTo(target, container, padding); } @Inject  DataTypeListShortcutsView(final ScrollHelper scrollHelper); }
DataTypeListShortcutsView implements DataTypeListShortcuts.View { void scrollTo(final Element target) { final int padding = 20; final HTMLElement container = getDataTypeList().getListItems(); scrollHelper.scrollTo(target, container, padding); } @Inject  DataTypeListShortcutsView(final ScrollHelper scrollHelper); void init(final DataTypeListShortcuts presenter); @Override Optional<Element> getFirstDataTypeRow(); @Override Optional<Element> getNextDataTypeRow(); @Override Optional<Element> getPrevDataTypeRow(); @Override Optional<DataTypeListItem> getCurrentDataTypeListItem(); @Override List<DataTypeListItem> getVisibleDataTypeListItems(); @Override void highlight(final Element element); @Override void focusIn(); void reset(); }
DataTypeListShortcutsView implements DataTypeListShortcuts.View { void scrollTo(final Element target) { final int padding = 20; final HTMLElement container = getDataTypeList().getListItems(); scrollHelper.scrollTo(target, container, padding); } @Inject  DataTypeListShortcutsView(final ScrollHelper scrollHelper); void init(final DataTypeListShortcuts presenter); @Override Optional<Element> getFirstDataTypeRow(); @Override Optional<Element> getNextDataTypeRow(); @Override Optional<Element> getPrevDataTypeRow(); @Override Optional<DataTypeListItem> getCurrentDataTypeListItem(); @Override List<DataTypeListItem> getVisibleDataTypeListItems(); @Override void highlight(final Element element); @Override void focusIn(); void reset();  }