@Test public void shouldSetHistoryViewWhenRnrIsAuthorized() { RnRForm rnRForm = viaRequisitionFragment.presenter.getRnRForm(); rnRForm.setStatus(RnRForm.STATUS.AUTHORIZED); viaRequisitionFragment.refreshRequisitionForm(rnRForm); assertThat(View.GONE).isEqualTo(viaRequisitionFragment.actionPanelView.getVisibility()); rnRForm.setEmergency(true); viaRequisitionFragment.refreshRequisitionForm(rnRForm); assertThat(View.GONE).isEqualTo(viaRequisitionFragment.actionPanelView.getVisibility()); assertFalse(viaRequisitionFragment.vgContainer.findViewById(R.id.et_external_consultations_performed).hasOnClickListeners()); assertFalse(viaRequisitionFragment.kitView.findViewById(R.id.et_via_kit_opened_chw).hasOnClickListeners()); }
@Override public void refreshRequisitionForm(RnRForm rnRForm) { bodyView.refresh(rnRForm); if (rnRForm.isEmergency()) { refreshEmergencyRnr(rnRForm); } else { refreshNormalRnr(rnRForm); } setEditable(); }
VIARequisitionFragment extends BaseReportFragment implements VIARequisitionView { @Override public void refreshRequisitionForm(RnRForm rnRForm) { bodyView.refresh(rnRForm); if (rnRForm.isEmergency()) { refreshEmergencyRnr(rnRForm); } else { refreshNormalRnr(rnRForm); } setEditable(); } }
VIARequisitionFragment extends BaseReportFragment implements VIARequisitionView { @Override public void refreshRequisitionForm(RnRForm rnRForm) { bodyView.refresh(rnRForm); if (rnRForm.isEmergency()) { refreshEmergencyRnr(rnRForm); } else { refreshNormalRnr(rnRForm); } setEditable(); }  }
VIARequisitionFragment extends BaseReportFragment implements VIARequisitionView { @Override public void refreshRequisitionForm(RnRForm rnRForm) { bodyView.refresh(rnRForm); if (rnRForm.isEmergency()) { refreshEmergencyRnr(rnRForm); } else { refreshNormalRnr(rnRForm); } setEditable(); }  @Override void onCreate(Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState); @Override void onViewCreated(View view, Bundle savedInstanceState); void hideOrShowAddProductMenuInVIAPage(); @Override void onCreateOptionsMenu(Menu menu, MenuInflater inflater); @Override boolean onOptionsItemSelected(MenuItem item); @Override void refreshRequisitionForm(RnRForm rnRForm); void setTitleWithPeriod(RnRForm rnRForm); @Override void highLightApprovedAmount(); @Override void highLightRequestAmount(); void setEditable(); @Override void showListInputError(int index); @NonNull Subscriber<RnRForm> getOnSavedSubscriber(); @Override void setProcessButtonName(String buttonName); @Override boolean validateConsultationNumber(); @NonNull @Override String getSignatureDialogTitle(); @Override void completeSuccess(); @Override void onActivityResult(int requestCode, int resultCode, Intent data); }
VIARequisitionFragment extends BaseReportFragment implements VIARequisitionView { @Override public void refreshRequisitionForm(RnRForm rnRForm) { bodyView.refresh(rnRForm); if (rnRForm.isEmergency()) { refreshEmergencyRnr(rnRForm); } else { refreshNormalRnr(rnRForm); } setEditable(); }  @Override void onCreate(Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState); @Override void onViewCreated(View view, Bundle savedInstanceState); void hideOrShowAddProductMenuInVIAPage(); @Override void onCreateOptionsMenu(Menu menu, MenuInflater inflater); @Override boolean onOptionsItemSelected(MenuItem item); @Override void refreshRequisitionForm(RnRForm rnRForm); void setTitleWithPeriod(RnRForm rnRForm); @Override void highLightApprovedAmount(); @Override void highLightRequestAmount(); void setEditable(); @Override void showListInputError(int index); @NonNull Subscriber<RnRForm> getOnSavedSubscriber(); @Override void setProcessButtonName(String buttonName); @Override boolean validateConsultationNumber(); @NonNull @Override String getSignatureDialogTitle(); @Override void completeSuccess(); @Override void onActivityResult(int requestCode, int resultCode, Intent data);  }