@Test public void fetchItems( FetchItemsEnum data ) { itemProvider.addItems( data.getInput() ); timeline.setFetchCount( data.getFetchCount() ); timeline.fetchItems(); timeline.fetchItems(); List<Item> actual = timeline.getItems(); assertArrayEquals( data.getOutput(), actual.toArray() ); }
public void fetchItems() { int restoreOffset = restoreIfNeeded(); items.addAll( itemProvider.fetchItems( getOldest(), getFetchCount() + restoreOffset ) ); storeTopItem(); }
Timeline { public void fetchItems() { int restoreOffset = restoreIfNeeded(); items.addAll( itemProvider.fetchItems( getOldest(), getFetchCount() + restoreOffset ) ); storeTopItem(); } }
Timeline { public void fetchItems() { int restoreOffset = restoreIfNeeded(); items.addAll( itemProvider.fetchItems( getOldest(), getFetchCount() + restoreOffset ) ); storeTopItem(); } Timeline( ItemProvider itemProvider, SessionStorage sessionStorage  ); }
Timeline { public void fetchItems() { int restoreOffset = restoreIfNeeded(); items.addAll( itemProvider.fetchItems( getOldest(), getFetchCount() + restoreOffset ) ); storeTopItem(); } Timeline( ItemProvider itemProvider, SessionStorage sessionStorage  ); void setFetchCount( int fetchCount ); int getFetchCount(); List<Item> getItems(); void fetchItems(); }
Timeline { public void fetchItems() { int restoreOffset = restoreIfNeeded(); items.addAll( itemProvider.fetchItems( getOldest(), getFetchCount() + restoreOffset ) ); storeTopItem(); } Timeline( ItemProvider itemProvider, SessionStorage sessionStorage  ); void setFetchCount( int fetchCount ); int getFetchCount(); List<Item> getItems(); void fetchItems(); static final int FETCH_COUNT_LOWER_BOUND; static final int FETCH_COUNT_UPPER_BOUND; }