@Test public void getEmptyWithRegularValues() throws Exception { final HealthDataValue value1 = createDataValue(field1, upperLimit1 - 10); final HealthDataValue value2 = createDataValue(field2, upperLimit2 - 10); final HealthData healthData = createHealthData(value1, value2); final List<HealthDataValue> result = notificationFilter.filter(healthData); Assert.assertEquals(0, result.size()); }
public List<HealthDataValue> filter(final HealthData healthData) { final List<HealthDataValue> filtered = new ArrayList<HealthDataValue>(); final List<HealthDataValue> values = healthData.getValues(); for (final HealthDataValue value : values) { final HealthDataField field = value.getField(); if (field.getNotification()) { checkUpperLimit(filtered, field, value); checkLowerLimit(filtered, field, value); } } return filtered; }
HealthDataNotificationFilter { public List<HealthDataValue> filter(final HealthData healthData) { final List<HealthDataValue> filtered = new ArrayList<HealthDataValue>(); final List<HealthDataValue> values = healthData.getValues(); for (final HealthDataValue value : values) { final HealthDataField field = value.getField(); if (field.getNotification()) { checkUpperLimit(filtered, field, value); checkLowerLimit(filtered, field, value); } } return filtered; } }
HealthDataNotificationFilter { public List<HealthDataValue> filter(final HealthData healthData) { final List<HealthDataValue> filtered = new ArrayList<HealthDataValue>(); final List<HealthDataValue> values = healthData.getValues(); for (final HealthDataValue value : values) { final HealthDataField field = value.getField(); if (field.getNotification()) { checkUpperLimit(filtered, field, value); checkLowerLimit(filtered, field, value); } } return filtered; }  }
HealthDataNotificationFilter { public List<HealthDataValue> filter(final HealthData healthData) { final List<HealthDataValue> filtered = new ArrayList<HealthDataValue>(); final List<HealthDataValue> values = healthData.getValues(); for (final HealthDataValue value : values) { final HealthDataField field = value.getField(); if (field.getNotification()) { checkUpperLimit(filtered, field, value); checkLowerLimit(filtered, field, value); } } return filtered; }  List<HealthDataValue> filter(final HealthData healthData); }
HealthDataNotificationFilter { public List<HealthDataValue> filter(final HealthData healthData) { final List<HealthDataValue> filtered = new ArrayList<HealthDataValue>(); final List<HealthDataValue> values = healthData.getValues(); for (final HealthDataValue value : values) { final HealthDataField field = value.getField(); if (field.getNotification()) { checkUpperLimit(filtered, field, value); checkLowerLimit(filtered, field, value); } } return filtered; }  List<HealthDataValue> filter(final HealthData healthData);  }