if (!dataQualityCheck(high_since, highMarkMgDl)) { Log.d(TAG, "Insufficient data quality to raise persistent high alert"); return false;
if (!dataQualityCheck(high_since, highMarkMgDl)) { Log.d(TAG, "Insufficient data quality to raise persistent high alert"); return false;
if (!dataQualityCheck(high_since, highMarkMgDl)) { Log.d(TAG, "Insufficient data quality to raise persistent high alert"); return false;
@Test public void dataQualityCheckTest() { assertWithMessage("No sensor invalid time should fail").that(PersistentHigh.dataQualityCheck(1000, HIGH_MARK)).isFalse(); assertWithMessage("No sensor ok time should fail").that(PersistentHigh.dataQualityCheck(START_TIME, HIGH_MARK)).isFalse(); assertWithMessage("No sensor ok time should fail 2").that(PersistentHigh.dataQualityCheck(JoH.tsl(), HIGH_MARK)).isFalse(); Sensor.create(1005); assertWithMessage("Predating sensor should fail").that(PersistentHigh.dataQualityCheck(1000, HIGH_MARK)).isFalse(); assertWithMessage("Post sensor start no data should fail").that(PersistentHigh.dataQualityCheck(JoH.tsl(), HIGH_MARK)).isFalse(); final BgReading bgr = BgReading.bgReadingInsertFromG5(400, timestamp); assertWithMessage("Test result A: " + i + " " + JoH.dateTimeText(timestamp) + " different to expected") .that(PersistentHigh.dataQualityCheck(START_TIME + Constants.MINUTE_IN_MS * 10, HIGH_MARK)) .isEqualTo(i > 16); final BgReading bgr = BgReading.bgReadingInsertFromG5(i == 20 ? 100 : 400, timestamp); assertWithMessage("Test result C: " + i + " " + JoH.dateTimeText(timestamp) + " different to expected") .that(PersistentHigh.dataQualityCheck(START_TIME + Constants.MINUTE_IN_MS * 10, HIGH_MARK)) .isEqualTo(i > 16 && i < 20); final BgReading bgr = BgReading.bgReadingInsertFromG5(i == 8 ? 100 : 400, timestamp); assertWithMessage("Test result D: " + i + " " + JoH.dateTimeText(timestamp) + " different to expected") .that(PersistentHigh.dataQualityCheck(START_TIME + Constants.MINUTE_IN_MS * 10, HIGH_MARK)) .isFalse();
@Test public void dataQualityCheckTest() { assertWithMessage("No sensor invalid time should fail").that(PersistentHigh.dataQualityCheck(1000, HIGH_MARK)).isFalse(); assertWithMessage("No sensor ok time should fail").that(PersistentHigh.dataQualityCheck(START_TIME, HIGH_MARK)).isFalse(); assertWithMessage("No sensor ok time should fail 2").that(PersistentHigh.dataQualityCheck(JoH.tsl(), HIGH_MARK)).isFalse(); Sensor.create(1005); assertWithMessage("Predating sensor should fail").that(PersistentHigh.dataQualityCheck(1000, HIGH_MARK)).isFalse(); assertWithMessage("Post sensor start no data should fail").that(PersistentHigh.dataQualityCheck(JoH.tsl(), HIGH_MARK)).isFalse(); final BgReading bgr = BgReading.bgReadingInsertFromG5(400, timestamp); assertWithMessage("Test result A: " + i + " " + JoH.dateTimeText(timestamp) + " different to expected") .that(PersistentHigh.dataQualityCheck(START_TIME + Constants.MINUTE_IN_MS * 10, HIGH_MARK)) .isEqualTo(i > 16); final BgReading bgr = BgReading.bgReadingInsertFromG5(i == 20 ? 100 : 400, timestamp); assertWithMessage("Test result C: " + i + " " + JoH.dateTimeText(timestamp) + " different to expected") .that(PersistentHigh.dataQualityCheck(START_TIME + Constants.MINUTE_IN_MS * 10, HIGH_MARK)) .isEqualTo(i > 16 && i < 20); final BgReading bgr = BgReading.bgReadingInsertFromG5(i == 8 ? 100 : 400, timestamp); assertWithMessage("Test result D: " + i + " " + JoH.dateTimeText(timestamp) + " different to expected") .that(PersistentHigh.dataQualityCheck(START_TIME + Constants.MINUTE_IN_MS * 10, HIGH_MARK)) .isFalse();