Home
last modified time | relevance | path

Searched refs:fromMeters (Results 1 – 25 of 51) sorted by relevance

123

/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/
DExerciseRouteTest.java68 .setHorizontalAccuracy(Length.fromMeters(horizontalAcc)) in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
69 .setVerticalAccuracy(Length.fromMeters(verticalAcc)) in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
70 .setAltitude(Length.fromMeters(altitude)) in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
76 assertThat(point.getAltitude()).isEqualTo(Length.fromMeters(altitude)); in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
77 assertThat(point.getHorizontalAccuracy()).isEqualTo(Length.fromMeters(horizontalAcc)); in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
78 assertThat(point.getVerticalAccuracy()).isEqualTo(Length.fromMeters(verticalAcc)); in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
98 .setHorizontalAccuracy(Length.fromMeters(-5)) in testExerciseRouteLocation_horizontalAccuracyIsInvalid_throwsException()
106 .setHorizontalAccuracy(Length.fromMeters(-5)) in testExerciseRouteLocation_verticalAccuracyIsInvalid_throwsException()
127 .setHorizontalAccuracy(Length.fromMeters(horizontalAcc)) in testExerciseRouteLocation_parcelable()
128 .setVerticalAccuracy(Length.fromMeters(verticalAcc)) in testExerciseRouteLocation_parcelable()
[all …]
DExerciseCompletionGoalTest.java72 assertThat(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))) in distanceGoal_equalsAndHashCode()
73 .isNotEqualTo(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(200))); in distanceGoal_equalsAndHashCode()
74 assertThat(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))) in distanceGoal_equalsAndHashCode()
75 .isEqualTo(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in distanceGoal_equalsAndHashCode()
77 assertThat(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100)).hashCode()) in distanceGoal_equalsAndHashCode()
79 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(200)).hashCode()); in distanceGoal_equalsAndHashCode()
80 assertThat(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100)).hashCode()) in distanceGoal_equalsAndHashCode()
82 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100)).hashCode()); in distanceGoal_equalsAndHashCode()
89 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(500))); in distanceGoal_insertionAndRead()
102 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(500)); in distanceGoal_getterMethods()
[all …]
DHeightRecordTest.java378 new Metadata.Builder().build(), Instant.now(), Length.fromMeters(1.0)); in testZoneOffsets()
541 new Metadata.Builder().build(), Instant.now(), Length.fromMeters(3.1)) in testCreateHeightRecord_invalidValue()
568 insertAndReadRecords(recordCount, Length.fromMeters(1.0)); in insertRecords_sameClientRecordIdAndNewData_readNewData()
570 Length newHeight = Length.fromMeters(2.0); in insertRecords_sameClientRecordIdAndNewData_readNewData()
582 Length oldHeight = Length.fromMeters(1.0); in insertRecords_sameClientRecordIdAndNewerVersion_readNewData()
586 Length newHeight = Length.fromMeters(2.0); in insertRecords_sameClientRecordIdAndNewerVersion_readNewData()
598 Length oldHeight = Length.fromMeters(1.0); in insertRecords_sameClientRecordIdAndSameVersion_readNewData()
601 Length newHeight = Length.fromMeters(2.0); in insertRecords_sameClientRecordIdAndSameVersion_readNewData()
613 Length oldHeight = Length.fromMeters(1.0); in insertRecords_sameClientRecordIdAndOlderVersion_readOldData()
617 Length newHeight = Length.fromMeters(2.0); in insertRecords_sameClientRecordIdAndOlderVersion_readOldData()
[all …]
DPlannedExerciseStepTest.java55 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in hashCodeAndEquals_sensitiveToAllFields()
142 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100)); in hashCodeAndEquals_sensitiveToAllFields()
144 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(200)); in hashCodeAndEquals_sensitiveToAllFields()
161 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in setDescriptionNull_setsDescriptionToNull()
173 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in clearPerformanceGoals_removesAllExistingPerformanceGoals()
186 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in getCompletionGoal()
189 .isEqualTo(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in getCompletionGoal()
198 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in getExerciseType()
210 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in getExerciseCategory()
222 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in addingMultiplePerformanceGoalsOfSameType_throwsIllegalArgumentException()
DExerciseLapTest.java43 .setLength(Length.fromMeters(12)) in testExerciseLap_buildLap_buildCorrectObject()
47 assertThat(lap.getLength()).isEqualTo(Length.fromMeters(12)); in testExerciseLap_buildLap_buildCorrectObject()
63 new ExerciseLap.Builder(START_TIME, END_TIME).setLength(Length.fromMeters(-10)).build(); in testExerciseLap_lengthIsNegative_throwsException()
68 new ExerciseLap.Builder(START_TIME, END_TIME).setLength(Length.fromMeters(1e10)).build(); in testExerciseLap_lengthIsHuge_throwsException()
DPlannedExerciseBlockTest.java74 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in hashCodeAndEquals_sensitiveToAllFields()
100 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in clearSteps_removesAllExistingSteps()
122 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))) in addStep()
DDistanceRecordTest.java350 Length.fromMeters(distance)) in getBaseDistanceRecordWithSameStartAndEndTime()
365 Length.fromMeters(10.0)); in testZoneOffsets()
539 Length.fromMeters(1000001.0)) in testCreateDistanceRecord_invalidValue()
558 Length.fromMeters(20.0)) in getDistanceRecord_update()
590 Length.fromMeters(10.0)) in getBaseDistanceRecord()
600 Length.fromMeters(distance)) in getBaseDistanceRecord()
621 Length.fromMeters(10.0)) in getCompleteDistanceRecord()
DElevationGainedRecordTest.java405 Length.fromMeters(10.0)); in testZoneOffsets()
423 Length.fromMeters(1000001.0)) in testCreateElevationGainedRecord_invalidValue()
609 Length.fromMeters(20.0)) in getElevationGainedRecord_update()
620 Length.fromMeters(10.0)) in getBaseElevationGainedRecord()
629 Length.fromMeters(elevation)) in getElevationGainedRecord()
639 Length.fromMeters(elevation)) in getElevationGainedRecord()
662 Length.fromMeters(10.0)) in getCompleteElevationGainedRecord()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/units/
DLengthTest.java34 assertThat(Length.fromMeters(10.0)).isInstanceOf(Length.class); in testCreate()
35 assertThat(Length.fromMeters(10.0).getInMeters()).isEqualTo(10.0); in testCreate()
40 Length Length1 = Length.fromMeters(10.0); in testEquals()
41 Length Length2 = Length.fromMeters(10.0); in testEquals()
42 Length Length3 = Length.fromMeters(20.0); in testEquals()
50 Length Length1 = Length.fromMeters(10.0); in testCompare()
51 Length Length2 = Length.fromMeters(10.0); in testCompare()
52 Length Length3 = Length.fromMeters(20.0); in testCompare()
/packages/modules/HealthFitness/tests/cts/route/src/android/healthconnect/cts/route/
DExerciseRouteTestHelper.java119 .setAltitude(Length.fromMeters(14)) in getRoute()
120 .setHorizontalAccuracy(Length.fromMeters(3)) in getRoute()
121 .setVerticalAccuracy(Length.fromMeters(5)) in getRoute()
129 .setAltitude(Length.fromMeters(123)) in getAnotherRoute()
130 .setHorizontalAccuracy(Length.fromMeters(7)) in getAnotherRoute()
131 .setVerticalAccuracy(Length.fromMeters(11)) in getAnotherRoute()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/dataentries/formatters/
DPlannedExerciseBlockFormatterTest.kt75 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
100 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
110 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(3500.0)), in <lambda>()
137 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
147 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(3500.0)), in <lambda>()
163 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
187 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(3500.0)), in <lambda>()
DPlannedExerciseSessionRecordFormatterTest.kt77 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
93 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(4000.0)), in <lambda>()
121 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
137 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(4000.0)), in <lambda>()
168 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
199 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(4000.0)), in <lambda>()
/packages/modules/HealthFitness/tests/unittests/src/android/healthconnect/internal/datatypes/
DExerciseCompletionGoalInternalTest.java42 DistanceGoalInternal original = new DistanceGoalInternal(Length.fromMeters(800)); in distanceGoal_writeToParcelThenRestore_objectsAreIdentical()
55 DistanceGoalInternal original = new DistanceGoalInternal(Length.fromMeters(800)); in distanceGoal_convertToExternalAndBack_objectsAreIdentical()
200 Length.fromMeters(100), Duration.ofMinutes(2)); in distanceWithVariableRestGoal_writeToParcelThenRestore_objectsAreIdentical()
216 Length.fromMeters(100), Duration.ofMinutes(2)); in distanceWithVariableRestGoal_convertToExternalAndBack_objectsAreIdentical()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/
DTestConstants.kt139 Length.fromMeters(Random.nextDouble(0.0, 5000.0)), date.randomInstant()) in getRandomRecord()
160 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in getSamplePlannedExerciseSessionRecord()
176 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(4000.0)), in getSamplePlannedExerciseSessionRecord()
363 getDistanceRecord(Length.fromMeters(1500.0), START_TIME)
389 getDistanceRecord(Length.fromMeters(2500.0), instantYesterday), in getMixedRecordsAcrossTwoDays()
399 getDistanceRecord(Length.fromMeters(2000.0), instantTwoDaysAgo))) in getMixedRecordsAcrossThreeDays()
/packages/modules/HealthFitness/framework/java/android/health/connect/internal/datatypes/
DExerciseRouteInternal.java244 builder.setHorizontalAccuracy(Length.fromMeters(getHorizontalAccuracy())); in toExternalExerciseRouteLocation()
248 builder.setVerticalAccuracy(Length.fromMeters(getVerticalAccuracy())); in toExternalExerciseRouteLocation()
252 builder.setAltitude(Length.fromMeters(getAltitude())); in toExternalExerciseRouteLocation()
DHeightRecordInternal.java47 return new HeightRecord.Builder(buildMetaData(), getTime(), Length.fromMeters(getHeight())) in toExternalRecord()
DElevationGainedRecordInternal.java52 Length.fromMeters(getElevation())) in toExternalRecord()
DDistanceRecordInternal.java51 Length.fromMeters(getDistance())) in toExternalRecord()
DExerciseCompletionGoalInternal.java127 return new DistanceGoalInternal(Length.fromMeters(parcel.readDouble())); in readFieldsFromParcel()
353 Length.fromMeters(parcel.readDouble()), Duration.ofMillis(parcel.readLong())); in readFieldsFromParcel()
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/
DExerciseLap.java49 Length.fromMeters(0.0), in ExerciseLap()
50 Length.fromMeters(MAX_LAP_LENGTH_METRES), in ExerciseLap()
DExerciseRoute.java133 builder.setHorizontalAccuracy(Length.fromMeters(source.readDouble()));
136 builder.setVerticalAccuracy(Length.fromMeters(source.readDouble()));
139 builder.setAltitude(Length.fromMeters(source.readDouble()));
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/migration/
DDataMigrationTest.java26 import static android.health.connect.datatypes.units.Length.fromMeters;
238 new HeightRecord.Builder(getMetadata(entityId), mEndTime, fromMeters(3D)).build(), in migrateHeight_clientRecordId_heightSaved()
258 new HeightRecord.Builder(getMetadata(uuid), mEndTime, fromMeters(3D)).build(), in migrateHeight_uuid_heightSaved()
281 new HeightRecord.Builder(getMetadata(recordEntityId), mEndTime, fromMeters(3D)) in migrateHeightUsingSharedMemory_heightSaved()
392 final Length height1 = fromMeters(3D); in migrateRecord_sameEntityId_notIgnored()
395 final Length height2 = fromMeters(1D); in migrateRecord_sameEntityId_notIgnored()
472 final Length height1 = fromMeters(1.0); in migrateIntervalRecord_noClientIdsAndSameTime_ignored()
476 final Length height2 = fromMeters(2.0); in migrateIntervalRecord_noClientIdsAndSameTime_ignored()
496 final Length height1 = fromMeters(1.0); in migrateIntervalRecord_differentClientIdsAndSameTime_notIgnored()
502 final Length height2 = fromMeters(2.0); in migrateIntervalRecord_differentClientIdsAndSameTime_notIgnored()
/packages/modules/HealthFitness/tests/unittests/src/android/health/connect/
DMigrationEntityParcelTest.java19 import static android.health.connect.datatypes.units.Length.fromMeters;
52 getMetadata(ENTITY_ID, APP_PACKAGE_NAME), END_TIME, fromMeters(3D))
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/units/
DLength.java37 public static Length fromMeters(double value) { in fromMeters() method in Length
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/libs/HealthConnectTestLib/src/android/healthconnect/cts/lib/
DUiTestUtils.kt295 testMetadataBuilder.build(), startTime, endTime, Length.fromMeters(500.0)) in distanceRecord()
308 Length.fromMeters(500.0)) in distanceRecord()

123