@Test public void shouldHideExpiryNotifyIconWhenExpiryDateIsEmpty() { Date mockCurrentDate = DateUtil.parseString("16/02/2016", DateUtil.SIMPLE_DATE_FORMAT); LMISTestApp.getInstance().setCurrentTimeMillis(mockCurrentDate.getTime()); StockCard stockCard = StockCardBuilder.buildStockCard(); InventoryViewModel inventoryViewModel = new InventoryViewModel(stockCard); viewHolder.populate(inventoryViewModel, ""); InventoryViewModel secondInventoryViewModel = new InventoryViewModel(stockCard); viewHolder.populate(secondInventoryViewModel, ""); assertThat(viewHolder.lyExpiryDateWarning.getVisibility()).isEqualTo(View.GONE); }
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);  }