@Test public void shouldLoadAllStockCardsWithMovement() throws Exception { StockCard stockcard1 = StockCardBuilder.buildStockCard(); StockMovementItem stockMovementItem = new StockMovementItem(stockcard1); stockMovementItem.setReason("INVENTORY"); stockcard1.getStockMovementItemsWrapper().add(stockMovementItem); StockCard stockcard2 = StockCardBuilder.buildStockCard(); List<StockCard> stockCards = Arrays.asList(stockcard1, stockcard2); when(mockStockRepository.list()).thenReturn(stockCards); mPresenter.loadAllMovementHistory(); assertEquals(2, mPresenter.viewModelList.size()); }
protected void loadAllMovementHistory() { if (viewModelList.isEmpty()) { viewModelList.addAll(FluentIterable.from(stockRepository.list()).transform(stockCard -> new StockHistoryViewModel(stockCard)).toList()); } }
AllDrugsMovementPresenter extends Presenter { protected void loadAllMovementHistory() { if (viewModelList.isEmpty()) { viewModelList.addAll(FluentIterable.from(stockRepository.list()).transform(stockCard -> new StockHistoryViewModel(stockCard)).toList()); } } }
AllDrugsMovementPresenter extends Presenter { protected void loadAllMovementHistory() { if (viewModelList.isEmpty()) { viewModelList.addAll(FluentIterable.from(stockRepository.list()).transform(stockCard -> new StockHistoryViewModel(stockCard)).toList()); } }  }
AllDrugsMovementPresenter extends Presenter { protected void loadAllMovementHistory() { if (viewModelList.isEmpty()) { viewModelList.addAll(FluentIterable.from(stockRepository.list()).transform(stockCard -> new StockHistoryViewModel(stockCard)).toList()); } }  @Override void attachView(BaseView v); void loadMovementHistory(final int days); }
AllDrugsMovementPresenter extends Presenter { protected void loadAllMovementHistory() { if (viewModelList.isEmpty()) { viewModelList.addAll(FluentIterable.from(stockRepository.list()).transform(stockCard -> new StockHistoryViewModel(stockCard)).toList()); } }  @Override void attachView(BaseView v); void loadMovementHistory(final int days);  }