@Test public void shouldEnableUnpackMenuAndUpdateExpiryDateGroupWhenStockCardSOHIsNotZeroAndKitHasProducts() throws Exception { StockCard stockCard = createStockCard(100, true); Product kit = ProductBuilder.buildAdultProduct(); kit.setKit(true); stockCard.setProduct(kit); when(mockStockRepository.queryStockCardById(200L)).thenReturn(stockCard); when(productRepository.queryKitProductByKitCode(kit.getCode())).thenReturn(Arrays.asList(new KitProduct())); stockMovementsPresenter.setStockCard(200L); verify(view).updateUnpackKitMenu(true); verify(view).updateExpiryDateViewGroup(); }
public void setStockCard(long stockCardId) throws LMISException { this.stockCard = stockRepository.queryStockCardById(stockCardId); updateMenus(); view.updateExpiryDateViewGroup(); }
StockMovementsPresenter extends Presenter { public void setStockCard(long stockCardId) throws LMISException { this.stockCard = stockRepository.queryStockCardById(stockCardId); updateMenus(); view.updateExpiryDateViewGroup(); } }
StockMovementsPresenter extends Presenter { public void setStockCard(long stockCardId) throws LMISException { this.stockCard = stockRepository.queryStockCardById(stockCardId); updateMenus(); view.updateExpiryDateViewGroup(); } StockMovementsPresenter(); }
StockMovementsPresenter extends Presenter { public void setStockCard(long stockCardId) throws LMISException { this.stockCard = stockRepository.queryStockCardById(stockCardId); updateMenus(); view.updateExpiryDateViewGroup(); } StockMovementsPresenter(); @Override void attachView(BaseView v); void setStockCard(long stockCardId); void loadStockMovementViewModels(); void archiveStockCard(); }
StockMovementsPresenter extends Presenter { public void setStockCard(long stockCardId) throws LMISException { this.stockCard = stockRepository.queryStockCardById(stockCardId); updateMenus(); view.updateExpiryDateViewGroup(); } StockMovementsPresenter(); @Override void attachView(BaseView v); void setStockCard(long stockCardId); void loadStockMovementViewModels(); void archiveStockCard();  }