@Test public void shouldReturnFalseWhenStatusIsNotMissingOrDraft() throws LMISException { ptvProgram = createInitialPTVProgram(); ptvProgram.setStatus(ViaReportStatus.SUBMITTED); boolean isNotSubmittedForApproval = ptvProgramPresenter.isNotSubmittedForApproval(); assertThat(false, is(isNotSubmittedForApproval)); }
public boolean isNotSubmittedForApproval() { return ptvProgram.getCreatedBy() != null && (ptvProgram.getStatus().equals(ViaReportStatus.DRAFT) || ptvProgram.getStatus().equals(ViaReportStatus.MISSING)) && ptvProgram.getCreatedBy().isEmpty(); }
PtvProgramPresenter extends Presenter { public boolean isNotSubmittedForApproval() { return ptvProgram.getCreatedBy() != null && (ptvProgram.getStatus().equals(ViaReportStatus.DRAFT) || ptvProgram.getStatus().equals(ViaReportStatus.MISSING)) && ptvProgram.getCreatedBy().isEmpty(); } }
PtvProgramPresenter extends Presenter { public boolean isNotSubmittedForApproval() { return ptvProgram.getCreatedBy() != null && (ptvProgram.getStatus().equals(ViaReportStatus.DRAFT) || ptvProgram.getStatus().equals(ViaReportStatus.MISSING)) && ptvProgram.getCreatedBy().isEmpty(); } PtvProgramPresenter(); }
PtvProgramPresenter extends Presenter { public boolean isNotSubmittedForApproval() { return ptvProgram.getCreatedBy() != null && (ptvProgram.getStatus().equals(ViaReportStatus.DRAFT) || ptvProgram.getStatus().equals(ViaReportStatus.MISSING)) && ptvProgram.getCreatedBy().isEmpty(); } PtvProgramPresenter(); @Override void attachView(BaseView v); Observable<PTVProgram> buildInitialPtvProgram(); Observable<PTVProgram> savePTVProgram(final boolean isCompleted); PTVProgram updatePTVProgram(String totalWoman, String totalChild); void buildPlaceholderRows(); boolean isNotSubmittedForApproval(); Observable<PTVProgram> signReport(String signature, boolean isComplete); }
PtvProgramPresenter extends Presenter { public boolean isNotSubmittedForApproval() { return ptvProgram.getCreatedBy() != null && (ptvProgram.getStatus().equals(ViaReportStatus.DRAFT) || ptvProgram.getStatus().equals(ViaReportStatus.MISSING)) && ptvProgram.getCreatedBy().isEmpty(); } PtvProgramPresenter(); @Override void attachView(BaseView v); Observable<PTVProgram> buildInitialPtvProgram(); Observable<PTVProgram> savePTVProgram(final boolean isCompleted); PTVProgram updatePTVProgram(String totalWoman, String totalChild); void buildPlaceholderRows(); boolean isNotSubmittedForApproval(); Observable<PTVProgram> signReport(String signature, boolean isComplete);  }