@Test public void shouldShowIconWhenExpireDateBeforeCurrentTime() throws Exception { StockCard stockCard = StockCardBuilder.buildStockCard(); Lot lot = new Lot(); lot.setExpirationDate(DateUtil.parseString("2016-01-14", DateUtil.DB_DATE_FORMAT)); LotOnHand lotOnHand = new LotOnHand(lot, stockCard, 100L); stockCard.getLotOnHandListWrapper().add(lotOnHand); InventoryViewModel inventoryViewModel = new InventoryViewModel(stockCard); Date mockCurrentDate = DateUtil.parseString("16/02/2016", DateUtil.SIMPLE_DATE_FORMAT); LMISTestApp.getInstance().setCurrentTimeMillis(mockCurrentDate.getTime()); viewHolder.populate(inventoryViewModel, ""); assertThat(viewHolder.lyExpiryDateWarning.getVisibility()).isEqualTo(View.VISIBLE); }
public void populate(final InventoryViewModel inventoryViewModel, String queryKeyWord) { setListener(inventoryViewModel); inflateData(inventoryViewModel, queryKeyWord); }
StockCardViewHolder extends BaseViewHolder { public void populate(final InventoryViewModel inventoryViewModel, String queryKeyWord) { setListener(inventoryViewModel); inflateData(inventoryViewModel, queryKeyWord); } }
StockCardViewHolder extends BaseViewHolder { public void populate(final InventoryViewModel inventoryViewModel, String queryKeyWord) { setListener(inventoryViewModel); inflateData(inventoryViewModel, queryKeyWord); } StockCardViewHolder(View itemView, OnItemViewClickListener listener); }
StockCardViewHolder extends BaseViewHolder { public void populate(final InventoryViewModel inventoryViewModel, String queryKeyWord) { setListener(inventoryViewModel); inflateData(inventoryViewModel, queryKeyWord); } StockCardViewHolder(View itemView, OnItemViewClickListener listener); void populate(final InventoryViewModel inventoryViewModel, String queryKeyWord); }
StockCardViewHolder extends BaseViewHolder { public void populate(final InventoryViewModel inventoryViewModel, String queryKeyWord) { setListener(inventoryViewModel); inflateData(inventoryViewModel, queryKeyWord); } StockCardViewHolder(View itemView, OnItemViewClickListener listener); void populate(final InventoryViewModel inventoryViewModel, String queryKeyWord);  }