@Test public void shouldReturnFalseWhenMalariaProgramHasSubmittedStatus() throws InvocationTargetException, NoSuchMethodException, LMISException, IllegalAccessException { initializeImplementationReportViewModels(); boolean isSubmittedForApproval = malariaDataReportFormPresenter.isSubmittedForApproval(); assertThat(isSubmittedForApproval, is(false)); }
public boolean isSubmittedForApproval() { return createdBy != null && (status.equals(ViaReportStatus.DRAFT) || status.equals(ViaReportStatus.MISSING)) && createdBy.isEmpty(); }
MalariaDataReportFormPresenter extends BaseReportPresenter { public boolean isSubmittedForApproval() { return createdBy != null && (status.equals(ViaReportStatus.DRAFT) || status.equals(ViaReportStatus.MISSING)) && createdBy.isEmpty(); } }
MalariaDataReportFormPresenter extends BaseReportPresenter { public boolean isSubmittedForApproval() { return createdBy != null && (status.equals(ViaReportStatus.DRAFT) || status.equals(ViaReportStatus.MISSING)) && createdBy.isEmpty(); } MalariaDataReportFormPresenter(); }
MalariaDataReportFormPresenter extends BaseReportPresenter { public boolean isSubmittedForApproval() { return createdBy != null && (status.equals(ViaReportStatus.DRAFT) || status.equals(ViaReportStatus.MISSING)) && createdBy.isEmpty(); } MalariaDataReportFormPresenter(); @Override void attachView(BaseView v); Observable<List<ImplementationReportViewModel>> getImplementationViewModelsForCurrentMalariaProgram(final Period period); MalariaProgram getMalariaProgram(); List<ImplementationReportViewModel> regenerateImplementationModels(ImplementationReportViewModel updatedViewModel); Observable<MalariaProgram> onSaveForm(final ViaReportStatus status, final String sign); @Override void deleteDraft(); @Override boolean isDraft(); boolean isSubmittedForApproval(); }
MalariaDataReportFormPresenter extends BaseReportPresenter { public boolean isSubmittedForApproval() { return createdBy != null && (status.equals(ViaReportStatus.DRAFT) || status.equals(ViaReportStatus.MISSING)) && createdBy.isEmpty(); } MalariaDataReportFormPresenter(); @Override void attachView(BaseView v); Observable<List<ImplementationReportViewModel>> getImplementationViewModelsForCurrentMalariaProgram(final Period period); MalariaProgram getMalariaProgram(); List<ImplementationReportViewModel> regenerateImplementationModels(ImplementationReportViewModel updatedViewModel); Observable<MalariaProgram> onSaveForm(final ViaReportStatus status, final String sign); @Override void deleteDraft(); @Override boolean isDraft(); boolean isSubmittedForApproval(); static final int INVALID_INDEX; }