@Test public void shouldCreatePatientDispensationsForCurrentPTVProgram() { PTVProgram ptvProgram = new PTVProgram(); List<PatientDispensation> actualPatientDispensations = patientDispensationBuilder.buildInitialPatientDispensations(ptvProgram); assertThat(actualPatientDispensations.size(), is(PATIENT_DISPENSATIONS_SIZE)); assertThat(typeExists(actualPatientDispensations, PatientDispensation.Type.CHILD), is(true)); assertThat(typeExists(actualPatientDispensations, PatientDispensation.Type.WOMAN), is(true)); }
public List<PatientDispensation> buildInitialPatientDispensations(PTVProgram ptvProgram) { List<PatientDispensation> patientDispensations = new ArrayList<>(); PatientDispensation patientDispensationChild = createPatientDispensation(ptvProgram, PatientDispensation.Type.CHILD); patientDispensations.add(patientDispensationChild); PatientDispensation patientDispensationWoman = createPatientDispensation(ptvProgram, PatientDispensation.Type.WOMAN); patientDispensations.add(patientDispensationWoman); return patientDispensations; }
PatientDispensationBuilder { public List<PatientDispensation> buildInitialPatientDispensations(PTVProgram ptvProgram) { List<PatientDispensation> patientDispensations = new ArrayList<>(); PatientDispensation patientDispensationChild = createPatientDispensation(ptvProgram, PatientDispensation.Type.CHILD); patientDispensations.add(patientDispensationChild); PatientDispensation patientDispensationWoman = createPatientDispensation(ptvProgram, PatientDispensation.Type.WOMAN); patientDispensations.add(patientDispensationWoman); return patientDispensations; } }
PatientDispensationBuilder { public List<PatientDispensation> buildInitialPatientDispensations(PTVProgram ptvProgram) { List<PatientDispensation> patientDispensations = new ArrayList<>(); PatientDispensation patientDispensationChild = createPatientDispensation(ptvProgram, PatientDispensation.Type.CHILD); patientDispensations.add(patientDispensationChild); PatientDispensation patientDispensationWoman = createPatientDispensation(ptvProgram, PatientDispensation.Type.WOMAN); patientDispensations.add(patientDispensationWoman); return patientDispensations; }  }
PatientDispensationBuilder { public List<PatientDispensation> buildInitialPatientDispensations(PTVProgram ptvProgram) { List<PatientDispensation> patientDispensations = new ArrayList<>(); PatientDispensation patientDispensationChild = createPatientDispensation(ptvProgram, PatientDispensation.Type.CHILD); patientDispensations.add(patientDispensationChild); PatientDispensation patientDispensationWoman = createPatientDispensation(ptvProgram, PatientDispensation.Type.WOMAN); patientDispensations.add(patientDispensationWoman); return patientDispensations; }  List<PatientDispensation> buildInitialPatientDispensations(PTVProgram ptvProgram); }
PatientDispensationBuilder { public List<PatientDispensation> buildInitialPatientDispensations(PTVProgram ptvProgram) { List<PatientDispensation> patientDispensations = new ArrayList<>(); PatientDispensation patientDispensationChild = createPatientDispensation(ptvProgram, PatientDispensation.Type.CHILD); patientDispensations.add(patientDispensationChild); PatientDispensation patientDispensationWoman = createPatientDispensation(ptvProgram, PatientDispensation.Type.WOMAN); patientDispensations.add(patientDispensationWoman); return patientDispensations; }  List<PatientDispensation> buildInitialPatientDispensations(PTVProgram ptvProgram);  }