@Test public void shouldNotShowDelIconForOldProduct() throws Exception { RequisitionFormItemViewModel viewModel = new RequisitionFormItemViewModel(formItem); viewHolder.populate(viewModel, presenter, LMISTestApp.getContext()); assertThat(viewHolder.ivDelete.getVisibility()).isEqualTo(View.INVISIBLE); }
public void populate(final RequisitionFormItemViewModel entry, VIARequisitionPresenter presenter, Context context) { this.presenter = presenter; this.context = context; productCode.setText(entry.getFmn()); productName.setText(entry.getProductName()); setDeleteIconForNewAddedProducts(entry); }
RequisitionProductViewHolder extends BaseViewHolder { public void populate(final RequisitionFormItemViewModel entry, VIARequisitionPresenter presenter, Context context) { this.presenter = presenter; this.context = context; productCode.setText(entry.getFmn()); productName.setText(entry.getProductName()); setDeleteIconForNewAddedProducts(entry); } }
RequisitionProductViewHolder extends BaseViewHolder { public void populate(final RequisitionFormItemViewModel entry, VIARequisitionPresenter presenter, Context context) { this.presenter = presenter; this.context = context; productCode.setText(entry.getFmn()); productName.setText(entry.getProductName()); setDeleteIconForNewAddedProducts(entry); } RequisitionProductViewHolder(View itemView); }
RequisitionProductViewHolder extends BaseViewHolder { public void populate(final RequisitionFormItemViewModel entry, VIARequisitionPresenter presenter, Context context) { this.presenter = presenter; this.context = context; productCode.setText(entry.getFmn()); productName.setText(entry.getProductName()); setDeleteIconForNewAddedProducts(entry); } RequisitionProductViewHolder(View itemView); void populate(final RequisitionFormItemViewModel entry, VIARequisitionPresenter presenter, Context context); Boolean hideDeleteIconInVIAPage(); }
RequisitionProductViewHolder extends BaseViewHolder { public void populate(final RequisitionFormItemViewModel entry, VIARequisitionPresenter presenter, Context context) { this.presenter = presenter; this.context = context; productCode.setText(entry.getFmn()); productName.setText(entry.getProductName()); setDeleteIconForNewAddedProducts(entry); } RequisitionProductViewHolder(View itemView); void populate(final RequisitionFormItemViewModel entry, VIARequisitionPresenter presenter, Context context); Boolean hideDeleteIconInVIAPage();  }