/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/dataentries/formatters/ |
D | NutritionFormatterTest.kt | 67 val record = getBuilder().setCaffeine(fromGrams(32.0)).build() in <lambda>() 74 val record = getBuilder().setCaffeine(fromGrams(32.0)).build() in <lambda>() 118 .setBiotin(fromGrams(4.0)) in <lambda>() 119 .setCaffeine(fromGrams(12.0)) in <lambda>() 120 .setCalcium(fromGrams(5.0)) in <lambda>() 123 .setChloride(fromGrams(11.0)) in <lambda>() 124 .setCholesterol(fromGrams(20.0)) in <lambda>() 125 .setChromium(fromGrams(10.0)) in <lambda>() 126 .setCopper(fromGrams(20.0)) in <lambda>() 127 .setDietaryFiber(fromGrams(34.0)) in <lambda>() [all …]
|
D | ExercisePerformanceGoalFormatterTest.kt | 79 WeightGoal(Mass.fromGrams(1000.0)), in <lambda>() 84 WeightGoal(Mass.fromGrams(1000.0)), title = "2.2 lb", titleA11y = "2.2 pounds")) in <lambda>()
|
D | BoneMassFormatterTest.kt | 153 return BoneMassRecord.Builder(getMetaData(), NOW, Mass.fromGrams(massInKg * 1000)).build() in getRecord()
|
D | BodyWaterMassFormatterTest.kt | 152 return BodyWaterMassRecord.Builder(getMetaData(), NOW, Mass.fromGrams(massInKg * 1000)) in getRecord()
|
D | LeanBodyMassFormatterTest.kt | 153 return LeanBodyMassRecord.Builder(getMetaData(), NOW, Mass.fromGrams(massInKg * 1000)) in getRecord()
|
D | WeightFormatterTest.kt | 153 return WeightRecord.Builder(getMetaData(), NOW, Mass.fromGrams(massInKg * 1000)).build() in getRecord()
|
/packages/modules/HealthFitness/framework/java/android/health/connect/internal/datatypes/ |
D | NutritionRecordInternal.java | 573 .setUnsaturatedFat(Mass.fromGrams(getUnsaturatedFat())) in toExternalRecord() 574 .setPotassium(Mass.fromGrams(getPotassium())) in toExternalRecord() 575 .setThiamin(Mass.fromGrams(getThiamin())) in toExternalRecord() 577 .setTransFat(Mass.fromGrams(getTransFat())) in toExternalRecord() 578 .setManganese(Mass.fromGrams(getManganese())) in toExternalRecord() 580 .setCaffeine(Mass.fromGrams(getCaffeine())) in toExternalRecord() 581 .setDietaryFiber(Mass.fromGrams(getDietaryFiber())) in toExternalRecord() 582 .setSelenium(Mass.fromGrams(getSelenium())) in toExternalRecord() 583 .setVitaminB6(Mass.fromGrams(getVitaminB6())) in toExternalRecord() 584 .setProtein(Mass.fromGrams(getProtein())) in toExternalRecord() [all …]
|
D | BodyWaterMassRecordInternal.java | 53 buildMetaData(), getTime(), Mass.fromGrams(getBodyWaterMass())) in toExternalRecord()
|
D | LeanBodyMassRecordInternal.java | 47 return new LeanBodyMassRecord.Builder(buildMetaData(), getTime(), Mass.fromGrams(getMass())) in toExternalRecord()
|
D | WeightRecordInternal.java | 47 return new WeightRecord.Builder(buildMetaData(), getTime(), Mass.fromGrams(getWeight())) in toExternalRecord()
|
D | BoneMassRecordInternal.java | 47 return new BoneMassRecord.Builder(buildMetaData(), getTime(), Mass.fromGrams(getMass())) in toExternalRecord()
|
D | ExercisePerformanceGoalInternal.java | 326 return new WeightGoalInternal(Mass.fromGrams(parcel.readDouble())); in readFieldsFromParcel()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/ |
D | NutritionRecordTest.java | 809 .setUnsaturatedFat(Mass.fromGrams(0.1)) in getNutritionRecord_update() 810 .setPotassium(Mass.fromGrams(0.1)) in getNutritionRecord_update() 811 .setThiamin(Mass.fromGrams(0.1)) in getNutritionRecord_update() 813 .setTransFat(Mass.fromGrams(0.1)) in getNutritionRecord_update() 814 .setManganese(Mass.fromGrams(0.1)) in getNutritionRecord_update() 816 .setCaffeine(Mass.fromGrams(0.1)) in getNutritionRecord_update() 817 .setDietaryFiber(Mass.fromGrams(0.1)) in getNutritionRecord_update() 818 .setSelenium(Mass.fromGrams(0.1)) in getNutritionRecord_update() 819 .setVitaminB6(Mass.fromGrams(0.1)) in getNutritionRecord_update() 820 .setProtein(Mass.fromGrams(0.1)) in getNutritionRecord_update() [all …]
|
D | ExercisePerformanceGoalTest.java | 269 assertThat(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000))) in weightGoal_equalsAndHashCode() 270 .isNotEqualTo(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(200_000))); in weightGoal_equalsAndHashCode() 271 assertThat(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000))) in weightGoal_equalsAndHashCode() 272 .isEqualTo(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000))); in weightGoal_equalsAndHashCode() 274 assertThat(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000)).hashCode()) in weightGoal_equalsAndHashCode() 276 new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(200_000)).hashCode()); in weightGoal_equalsAndHashCode() 277 assertThat(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000)).hashCode()) in weightGoal_equalsAndHashCode() 279 new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000)).hashCode()); in weightGoal_equalsAndHashCode() 286 new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(80_000))); in weightGoal_insertAndRead() 299 new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(20_000)); in weightGoal_getters() [all …]
|
D | WeightRecordTest.java | 252 return new WeightRecord.Builder(new Metadata.Builder().build(), time, Mass.fromGrams(50)) in getBaseWeightRecord() 366 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(10.0)); in testZoneOffsets() 560 assertThat(responses.get(i).get(WEIGHT_MIN)).isEqualTo(Mass.fromGrams(10.0)); in testAggregatePeriodForZoneOffset() 602 new WeightRecord.Builder(metadata, t1, Mass.fromGrams(50000)) in testAggregateDuration_differentTimeZones_correctBucketTimes() 606 new WeightRecord.Builder(metadata, t2, Mass.fromGrams(100000)) in testAggregateDuration_differentTimeZones_correctBucketTimes() 675 assertThat(responses.get(i).get(WEIGHT_MAX)).isEqualTo(Mass.fromGrams(10.0)); in testDurationLocalTimeAggregationZoneOffset() 726 Mass.fromGrams(10.0)) in testAggregateLocalFilter_minOffsetRecord() 732 Mass.fromGrams(20.0)) in testAggregateLocalFilter_minOffsetRecord() 737 assertThat(response.get(WEIGHT_MAX)).isEqualTo(Mass.fromGrams(20.0)); in testAggregateLocalFilter_minOffsetRecord() 739 assertThat(response.get(WEIGHT_MIN)).isEqualTo(Mass.fromGrams(10.0)); in testAggregateLocalFilter_minOffsetRecord() [all …]
|
D | BodyWaterMassRecordTest.java | 312 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(1)); in testZoneOffsets() 321 new BodyWaterMassRecord.Builder(generateMetadata(), TIME, Mass.fromGrams(40)) in testBodyWaterMass_buildSession_buildCorrectObject() 330 new BodyWaterMassRecord.Builder(metadata, TIME, Mass.fromGrams(40)).build(); in testBodyWaterMass_buildEqualSessions_equalsReturnsTrue() 332 new BodyWaterMassRecord.Builder(metadata, TIME, Mass.fromGrams(40)).build(); in testBodyWaterMass_buildEqualSessions_equalsReturnsTrue() 339 new BodyWaterMassRecord.Builder(generateMetadata(), TIME, Mass.fromGrams(40)) in testBodyWaterMass_buildSessionWithAllFields_buildCorrectObject() 343 assertThat(record.getBodyWaterMass()).isEqualTo(Mass.fromGrams(40)); in testBodyWaterMass_buildSessionWithAllFields_buildCorrectObject() 539 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(1001000.0)) in testCreateBodyWaterMassRecord_invalidValue() 555 return new BodyWaterMassRecord.Builder(metadataWithId, Instant.now(), Mass.fromGrams(20.0)) in getBodyWaterMassRecord_update() 562 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(100.0)) in getBaseBodyWaterMassRecord() 568 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(mass)) in getBodyWaterMassRecord() [all …]
|
D | BoneMassRecordTest.java | 322 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(10.0)); in testZoneOffsets() 442 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(1001000.0)) in testCreateBoneMassRecord_invalidValue() 502 return new BoneMassRecord.Builder(metadataWithId, Instant.now(), Mass.fromGrams(10.0)) in getBoneMassRecord_update() 509 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(10.0)) in getBaseBoneMassRecord() 528 testMetadataBuilder.build(), Instant.now(), Mass.fromGrams(10.0)) in getCompleteBoneMassRecord()
|
D | LeanBodyMassRecordTest.java | 329 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(10.0)); in testZoneOffsets() 338 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(1000000.1)) in testCreateLeanBodyMassRecord_invalidValue() 513 return new LeanBodyMassRecord.Builder(metadataWithId, Instant.now(), Mass.fromGrams(20.0)) in getLeanBodyMassRecord_update() 520 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(10.0)) in getBaseLeanBodyMassRecord() 539 testMetadataBuilder.build(), Instant.now(), Mass.fromGrams(10.0)) in getCompleteLeanBodyMassRecord()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/units/ |
D | MassTest.java | 34 assertThat(Mass.fromGrams(10.0)).isInstanceOf(Mass.class); in testCreate() 35 assertThat(Mass.fromGrams(10.0).getInGrams()).isEqualTo(10.0); in testCreate() 40 Mass Mass1 = Mass.fromGrams(10.0); in testEquals() 41 Mass Mass2 = Mass.fromGrams(10.0); in testEquals() 42 Mass Mass3 = Mass.fromGrams(20.0); in testEquals() 50 Mass Mass1 = Mass.fromGrams(10.0); in testCompare() 51 Mass Mass2 = Mass.fromGrams(10.0); in testCompare() 52 Mass Mass3 = Mass.fromGrams(20.0); in testCompare()
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/ |
D | TestConstants.kt | 365 val WEIGHT_DAY_100: WeightRecord = getWeightRecord(INSTANT_DAY, Mass.fromGrams(100000.0)) 366 val WEIGHT_WEEK_100: WeightRecord = getWeightRecord(INSTANT_WEEK, Mass.fromGrams(100000.0)) 367 val WEIGHT_MONTH_100: WeightRecord = getWeightRecord(INSTANT_MONTH3, Mass.fromGrams(100000.0)) 368 val WEIGHT_STARTDATE_100: WeightRecord = getWeightRecord(START_TIME, Mass.fromGrams(100000.0)) 380 getBodyWaterMassRecord(INSTANT_WEEK, Mass.fromGrams(1000.0)) 398 getWeightRecord(instantTwoDaysAgo, Mass.fromGrams(95000.0)), in getMixedRecordsAcrossThreeDays()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/aggregation/ |
D | DataFactory.java | 108 return new LeanBodyMassRecord.Builder(getEmptyMetadata(), time, Mass.fromGrams(grams)) in getBaseLeanBodyMassRecord() 118 return new WeightRecord.Builder(getEmptyMetadata(), time, Mass.fromGrams(weightKg * 1000)) in getBaseWeightRecord()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ |
D | SharedMemoryTest.java | 143 Mass.fromGrams(Math.random() * 7000.0)) in insertRecordsAndReadRecordsByIds_viaSharedMemory_recordsEqual() 154 Mass.fromGrams(720000)) in insertRecordsAndReadRecordsByIds_viaSharedMemory_recordsEqual() 275 Mass.fromGrams(1000.0 * 70.0 + i * 10)) in getChangeLogs_viaSharedMemory_recordsMatch()
|
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/units/ |
D | Mass.java | 38 public static Mass fromGrams(double value) { in fromGrams() method in Mass
|
/packages/modules/HealthFitness/tests/unittests/src/android/healthconnect/internal/datatypes/ |
D | ExercisePerformanceGoalInternalTest.java | 184 WeightGoalInternal original = new WeightGoalInternal(Mass.fromGrams(80_000)); in weightGoal_writeToParcelThenRestore_objectsAreIdentical() 199 new ExercisePerformanceGoalInternal.WeightGoalInternal(Mass.fromGrams(5_000)); in weightGoal_convertToExternalAndBack_objectsAreIdentical()
|
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/ |
D | DataFactory.java | 350 return new WeightRecord.Builder(new Metadata.Builder().build(), time, Mass.fromGrams(grams)) in getWeightRecord() 355 return new WeightRecord.Builder(getEmptyMetadata(), time, Mass.fromGrams(weight)) in getWeightRecord()
|