@SuppressWarnings({ "unchecked", "rawtypes" }) @Test public void getItem_itemRequested_dataCommunicatorInvoked() { DataCommunicator<String> dataCommunicator = Mockito .mock(DataCommunicator.class); Mockito.when(dataCommunicator.getDataProvider()) .thenReturn((DataProvider) DataProvider.ofItems()); GridDataView<String> dataView = new GridDataView<>(dataCommunicator, new Grid<>()); dataView.getItem(42); Mockito.verify(dataCommunicator).getItem(42); }
@Override public T getItem(int index) { return dataCommunicator.getItem(index); }
GridDataView extends AbstractDataView<T> { @Override public T getItem(int index) { return dataCommunicator.getItem(index); } }
GridDataView extends AbstractDataView<T> { @Override public T getItem(int index) { return dataCommunicator.getItem(index); } GridDataView(DataCommunicator<T> dataCommunicator,
                        Grid<T> grid); }
GridDataView extends AbstractDataView<T> { @Override public T getItem(int index) { return dataCommunicator.getItem(index); } GridDataView(DataCommunicator<T> dataCommunicator,
                        Grid<T> grid); @Override T getItem(int index); @Override Stream<T> getItems(); @Override void setIdentifierProvider(
            IdentifierProvider<T> identifierProvider); }
GridDataView extends AbstractDataView<T> { @Override public T getItem(int index) { return dataCommunicator.getItem(index); } GridDataView(DataCommunicator<T> dataCommunicator,
                        Grid<T> grid); @Override T getItem(int index); @Override Stream<T> getItems(); @Override void setIdentifierProvider(
            IdentifierProvider<T> identifierProvider);  }