@Test public void oneDoctorEnabledForTwoTypeNotificationsGet4() throws Exception { final Doctor doctor1 = createDoctor(true, true); final Doctor doctor2 = createDoctor(false, false); setDoctors(doctor1, doctor2); final HealthData healthData = createHealthData(); final List<HealthDataValue> filteredValues = createDummyFilteredValues(); final List<Notification> result = generator.generate(healthData, filteredValues); Assert.assertEquals(2 * 2, result.size()); }
public List<Notification> generate(final HealthData healthData, final List<HealthDataValue> filteredValues) { final List<Notification> generated = new ArrayList<Notification>(); final Patient patient = healthData.getPatient(); final List<Doctor> doctors = patient.getDoctors(); for (final Doctor doctor : doctors) { final List<Notification> doctorNotifications = createNotifications(filteredValues, patient, doctor); generated.addAll(doctorNotifications); } return generated; }
NotificationGenerator { public List<Notification> generate(final HealthData healthData, final List<HealthDataValue> filteredValues) { final List<Notification> generated = new ArrayList<Notification>(); final Patient patient = healthData.getPatient(); final List<Doctor> doctors = patient.getDoctors(); for (final Doctor doctor : doctors) { final List<Notification> doctorNotifications = createNotifications(filteredValues, patient, doctor); generated.addAll(doctorNotifications); } return generated; } }
NotificationGenerator { public List<Notification> generate(final HealthData healthData, final List<HealthDataValue> filteredValues) { final List<Notification> generated = new ArrayList<Notification>(); final Patient patient = healthData.getPatient(); final List<Doctor> doctors = patient.getDoctors(); for (final Doctor doctor : doctors) { final List<Notification> doctorNotifications = createNotifications(filteredValues, patient, doctor); generated.addAll(doctorNotifications); } return generated; }  }
NotificationGenerator { public List<Notification> generate(final HealthData healthData, final List<HealthDataValue> filteredValues) { final List<Notification> generated = new ArrayList<Notification>(); final Patient patient = healthData.getPatient(); final List<Doctor> doctors = patient.getDoctors(); for (final Doctor doctor : doctors) { final List<Notification> doctorNotifications = createNotifications(filteredValues, patient, doctor); generated.addAll(doctorNotifications); } return generated; }  List<Notification> generate(final HealthData healthData,
            final List<HealthDataValue> filteredValues); }
NotificationGenerator { public List<Notification> generate(final HealthData healthData, final List<HealthDataValue> filteredValues) { final List<Notification> generated = new ArrayList<Notification>(); final Patient patient = healthData.getPatient(); final List<Doctor> doctors = patient.getDoctors(); for (final Doctor doctor : doctors) { final List<Notification> doctorNotifications = createNotifications(filteredValues, patient, doctor); generated.addAll(doctorNotifications); } return generated; }  List<Notification> generate(final HealthData healthData,
            final List<HealthDataValue> filteredValues);  }