@Test public void shouldUpdatePTVProgramFromPTVViewModelsAndChildAndWomenNumber() throws LMISException { ptvProgram = createInitialPTVProgram(); ptvProgram.setPatientDispensations(PTVUtil.createDummyPatientDispensations()); when(ptvViewModelToPTVProgramMapper.convertToPTVProgram(ptvViewModels, ptvProgram)).thenReturn(ptvProgram); String numberOfChild = String.valueOf(1 + new Random().nextInt(99)); String numberOfWomen = String.valueOf(1 + new Random().nextInt(99)); PTVProgram actualPTVProgram = ptvProgramPresenter.updatePTVProgram(numberOfWomen, numberOfChild); assertWomanAndChildQuantitiesAreSetUp(numberOfChild, numberOfWomen, actualPTVProgram); }
public PTVProgram updatePTVProgram(String totalWoman, String totalChild) { ptvProgram = ptvViewModelToPTVProgramMapper.convertToPTVProgram(viewModels, ptvProgram); List<PatientDispensation> patientDispensations = updatePatientDispensations(totalWoman, totalChild); ptvProgram.setPatientDispensations(patientDispensations); return ptvProgram; }
PtvProgramPresenter extends Presenter { public PTVProgram updatePTVProgram(String totalWoman, String totalChild) { ptvProgram = ptvViewModelToPTVProgramMapper.convertToPTVProgram(viewModels, ptvProgram); List<PatientDispensation> patientDispensations = updatePatientDispensations(totalWoman, totalChild); ptvProgram.setPatientDispensations(patientDispensations); return ptvProgram; } }
PtvProgramPresenter extends Presenter { public PTVProgram updatePTVProgram(String totalWoman, String totalChild) { ptvProgram = ptvViewModelToPTVProgramMapper.convertToPTVProgram(viewModels, ptvProgram); List<PatientDispensation> patientDispensations = updatePatientDispensations(totalWoman, totalChild); ptvProgram.setPatientDispensations(patientDispensations); return ptvProgram; } PtvProgramPresenter(); }
PtvProgramPresenter extends Presenter { public PTVProgram updatePTVProgram(String totalWoman, String totalChild) { ptvProgram = ptvViewModelToPTVProgramMapper.convertToPTVProgram(viewModels, ptvProgram); List<PatientDispensation> patientDispensations = updatePatientDispensations(totalWoman, totalChild); ptvProgram.setPatientDispensations(patientDispensations); return ptvProgram; } 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 PTVProgram updatePTVProgram(String totalWoman, String totalChild) { ptvProgram = ptvViewModelToPTVProgramMapper.convertToPTVProgram(viewModels, ptvProgram); List<PatientDispensation> patientDispensations = updatePatientDispensations(totalWoman, totalChild); ptvProgram.setPatientDispensations(patientDispensations); return ptvProgram; } 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);  }