@Test public void shouldGetConsultantNumber() { BaseInfoItem baseInfoItem = new BaseInfoItem(); baseInfoItem.setValue("123"); ArrayList<BaseInfoItem> items = newArrayList(baseInfoItem); RnRForm rnRForm = mock(RnRForm.class); presenter.rnRForm = rnRForm; when(rnRForm.getBaseInfoItemListWrapper()).thenReturn(items); assertThat(presenter.getConsultationNumbers(), is("123")); }
public String getConsultationNumbers() { if (rnRForm != null && !rnRForm.getBaseInfoItemListWrapper().isEmpty()) { return rnRForm.getBaseInfoItemListWrapper().get(0).getValue(); } return null; }
VIARequisitionPresenter extends BaseRequisitionPresenter { public String getConsultationNumbers() { if (rnRForm != null && !rnRForm.getBaseInfoItemListWrapper().isEmpty()) { return rnRForm.getBaseInfoItemListWrapper().get(0).getValue(); } return null; } }
VIARequisitionPresenter extends BaseRequisitionPresenter { public String getConsultationNumbers() { if (rnRForm != null && !rnRForm.getBaseInfoItemListWrapper().isEmpty()) { return rnRForm.getBaseInfoItemListWrapper().get(0).getValue(); } return null; } VIARequisitionPresenter(); }
VIARequisitionPresenter extends BaseRequisitionPresenter { public String getConsultationNumbers() { if (rnRForm != null && !rnRForm.getBaseInfoItemListWrapper().isEmpty()) { return rnRForm.getBaseInfoItemListWrapper().get(0).getValue(); } return null; } VIARequisitionPresenter(); @Override void loadData(long formId, Date periodEndDate); void loadEmergencyData(final List<StockCard> stockCards, final Date periodEndDate); @Override void attachView(BaseView baseView); void populateAdditionalDrugsViewModels(List<RnrFormItem> addedDrugInVIAs, Date periodBegin); void deleteRnRItemFromViewModel(final RnrFormItem rnrFormItem); @Override void updateUIAfterSubmit(); @Override void updateFormUI(); @Override void submitRequisition(); boolean processRequisition(String consultationNumbers); Observable<RnRForm> getSaveFormObservable(final String consultationNumbers); String getConsultationNumbers(); void setConsultationNumbers(String consultationNumbers); void createStockCardsOrUnarchiveAndAddToFormForAdditionalRnrItems(); Observable<Void> removeRnrItem(final RnrFormItem rnrFormItem); }
VIARequisitionPresenter extends BaseRequisitionPresenter { public String getConsultationNumbers() { if (rnRForm != null && !rnRForm.getBaseInfoItemListWrapper().isEmpty()) { return rnRForm.getBaseInfoItemListWrapper().get(0).getValue(); } return null; } VIARequisitionPresenter(); @Override void loadData(long formId, Date periodEndDate); void loadEmergencyData(final List<StockCard> stockCards, final Date periodEndDate); @Override void attachView(BaseView baseView); void populateAdditionalDrugsViewModels(List<RnrFormItem> addedDrugInVIAs, Date periodBegin); void deleteRnRItemFromViewModel(final RnrFormItem rnrFormItem); @Override void updateUIAfterSubmit(); @Override void updateFormUI(); @Override void submitRequisition(); boolean processRequisition(String consultationNumbers); Observable<RnRForm> getSaveFormObservable(final String consultationNumbers); String getConsultationNumbers(); void setConsultationNumbers(String consultationNumbers); void createStockCardsOrUnarchiveAndAddToFormForAdditionalRnrItems(); Observable<Void> removeRnrItem(final RnrFormItem rnrFormItem);  }