/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/data/entries/datenavigation/ |
D | DateNavigationViewTest.kt | 28 import com.android.healthconnect.controller.tests.utils.NOW 78 dateNavigationView.setDate(NOW.minus(Duration.ofDays(1))) in setPeriodToDay_yesterday_showsYesterday() 85 dateNavigationView.setDate(NOW.minus(Duration.ofDays(2))) in setPeriodToDay_twoDaysAgo_showsDate() 92 dateNavigationView.setDate(NOW.minus(Duration.ofDays(365))) in setPeriodToDay_thisTimeLastYear_showsYear() 99 dateNavigationView.setDate(NOW.minus(Duration.ofDays(367))) in setPeriodToDay_lastYear_showsYear() 106 dateNavigationView.setDate(NOW.minus(Duration.ofDays(3))) in setPeriodToWeek_navigateToMonday_showsThisWeek() 114 dateNavigationView.setDate(NOW.minus(Duration.ofDays(4))) in setPeriodToWeek_navigateToSunday_showsLastWeek() 122 dateNavigationView.setDate(NOW.minus(Duration.ofDays(14))) in setPeriodToWeek_twoWeeksAgo_showsTwoWeeksAgo() 130 dateNavigationView.setDate(NOW.minus(Duration.ofDays(365))) in setPeriodToWeek_thisTimeLastYear_showsYear() 138 dateNavigationView.setDate(NOW.minus(Duration.ofDays(379))) in setPeriodToWeek_lastYear_showsYear() [all …]
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/dataentries/formatters/ |
D | SleepSessionFormatterTest.kt | 33 import com.android.healthconnect.controller.tests.utils.NOW 93 val start = NOW in <lambda>() 94 val end = NOW.plus(1, ChronoUnit.HOURS) in <lambda>() 104 val start = NOW in <lambda>() 105 val end = NOW.plus(1, ChronoUnit.HOURS) in <lambda>() 115 val start = NOW in <lambda>() 116 val end = NOW.plus(1, ChronoUnit.HOURS) in <lambda>() 126 val start = NOW in <lambda>() 127 val end = NOW.plus(1, ChronoUnit.HOURS) in <lambda>() 137 val start = NOW in <lambda>() [all …]
|
D | ExerciseSessionFormatterTest.kt | 34 import com.android.healthconnect.controller.tests.utils.NOW 92 NOW, NOW.plusSeconds(500), EXERCISE_SEGMENT_TYPE_JUMPING_JACK) in <lambda>() 99 ExerciseLap.Builder(NOW, NOW.plusSeconds(500)) in <lambda>() 132 return ExerciseSessionRecord.Builder(getMetaData(), NOW, NOW.plusSeconds(1000), type) in getRecord()
|
D | MenstruationPeriodFormatterTest.kt | 28 import com.android.healthconnect.controller.tests.utils.NOW 64 val start = NOW in <lambda>() 65 val end = NOW.plus(ofDays(5)) in <lambda>() 66 val day = NOW in <lambda>() 84 val start = NOW in format_lastDay_formatsMenstruationPeriod() 85 val end = NOW.plus(ofDays(5)) in format_lastDay_formatsMenstruationPeriod()
|
D | PowerFormatterTest.kt | 25 import com.android.healthconnect.controller.tests.utils.NOW 113 NOW, in getPowerRecord() 114 NOW.plusSeconds(samples.size.toLong()), in getPowerRecord() 115 samples.map { PowerRecord.PowerRecordSample(Power.fromWatts(it), NOW) }) in getPowerRecord()
|
D | CyclingPedalingCadenceFormatterTest.kt | 25 import com.android.healthconnect.controller.tests.utils.NOW in <lambda>() 122 NOW, in <lambda>() 123 NOW.plusSeconds(100), in <lambda>() 125 CyclingPedalingCadenceRecordSample(d, NOW.plusSeconds(index.toLong())) in <lambda>()
|
D | StepsCadenceFormatterTest.kt | 24 import com.android.healthconnect.controller.tests.utils.NOW in <lambda>() 119 NOW, in <lambda>() 120 NOW.plusSeconds(samples.size.toLong() + 1), in <lambda>() 122 StepsCadenceRecord.StepsCadenceRecordSample(rate, NOW.plusSeconds(1)) in <lambda>()
|
D | FloorsFormatterTest.kt | 23 import com.android.healthconnect.controller.tests.utils.NOW 72 return FloorsClimbedRecord.Builder(getMetaData(), NOW, NOW.plusSeconds(2), floors).build() in getRecord()
|
D | WheelchairPushesFormatterTest.kt | 23 import com.android.healthconnect.controller.tests.utils.NOW 92 return WheelchairPushesRecord.Builder(getMetaData(), NOW, NOW.plusSeconds(10), count) in getRecord()
|
D | ActiveCaloriesBurnedFormatterTest.kt | 24 import com.android.healthconnect.controller.tests.utils.NOW 87 getMetaData(), NOW, NOW.plusSeconds(1), Energy.fromCalories(calories)) in getActiveCaloriesBurnedRecord()
|
D | TotalCaloriesBurnedFormatterTest.kt | 24 import com.android.healthconnect.controller.tests.utils.NOW 87 getMetaData(), NOW, NOW.plusSeconds(1), Energy.fromCalories(calories)) in getTotalCaloriesBurnedRecord()
|
/packages/modules/OnDevicePersonalization/tests/federatedcomputetests/src/com/android/federatedcompute/services/data/ |
D | FederatedComputeEncryptionKeyTest.java | 37 private static final long NOW = 1698193647L; field in FederatedComputeEncryptionKeyTest 45 KEY_ID, PUBLIC_KEY, KEY_TYPE, NOW, NOW + TTL) in testBuilderAndEquals() 53 .setCreationTime(NOW) in testBuilderAndEquals() 54 .setExpiryTime(NOW + TTL) in testBuilderAndEquals() 64 .setCreationTime(NOW) in testBuilderAndEquals() 65 .setExpiryTime(NOW + TTL) in testBuilderAndEquals() 76 KEY_ID, PUBLIC_KEY, KEY_TYPE, NOW, NOW + TTL); in testBuildTwiceThrows()
|
D | ODPAuthorizationTokenTest.java | 37 private static final long NOW = 1000000L; field in ODPAuthorizationTokenTest 46 .setCreationTime(NOW) in testBuilderAndEquals() 47 .setExpiryTime(NOW + ONE_HOUR).build(); in testBuilderAndEquals() 51 .setCreationTime(NOW) in testBuilderAndEquals() 52 .setExpiryTime(NOW + ONE_HOUR).build(); in testBuilderAndEquals() 59 .setCreationTime(NOW) in testBuilderAndEquals() 60 .setExpiryTime(NOW + ONE_HOUR).build(); in testBuilderAndEquals() 71 .setCreationTime(NOW) in testBuildTwiceThrows() 72 .setExpiryTime(NOW + ONE_HOUR); in testBuildTwiceThrows()
|
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/ |
D | DataFactory.java | 68 public static final Instant NOW = Instant.now().truncatedTo(ChronoUnit.MILLIS); field in DataFactory 69 public static final Instant SESSION_START_TIME = NOW.minus(10, ChronoUnit.DAYS); 296 Instant instant = NOW; in getHeartRateRecord() 309 return getHeartRateRecord(heartRate, NOW.plusMillis(100), clientId); in getHeartRateRecord() 313 return getHeartRateRecord(heartRate, NOW.plusMillis(100)); in getHeartRateRecord() 380 return new StepsRecord.Builder(metadata, NOW, NOW.plusMillis(1000), steps).build(); in getStepsRecord() 395 return new StepsRecord.Builder(generateMetadata(id), NOW, NOW.plusMillis(1000), 10).build(); in getStepsRecord() 401 NOW, NOW.plusMillis(1000), /* clientRecordId= */ "SR" + Math.random()); in getCompleteStepsRecord() 489 return new StepsRecord.Builder(metadataWithId, NOW, NOW.plusMillis(2000), 20) in getUpdatedStepsRecord() 490 .setStartZoneOffset(ZoneOffset.systemDefault().getRules().getOffset(NOW)) in getUpdatedStepsRecord() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/signals/ |
D | UpdateProcessingOrchestratorTest.java | 77 private static final Instant NOW = CommonFixture.FIXED_NOW; field in UpdateProcessingOrchestratorTest 108 ADTECH, PACKAGE, NOW, new JSONObject(), DEV_CONTEXT, mUpdateSignalsApiCalledStats); in testUpdatesProcessorEmptyJson() 111 .insertAndDelete(ADTECH, NOW, Collections.emptyList(), Collections.emptyList()); in testUpdatesProcessorEmptyJson() 150 NOW, in testUpdatesProcessorBadJson() 179 ADTECH, PACKAGE, NOW, json, DEV_CONTEXT, mUpdateSignalsApiCalledStats); in testUpdatesProcessorSingleInsert() 183 .insertAndDelete(ADTECH, NOW, expected, Collections.emptyList()); in testUpdatesProcessorSingleInsert() 209 ADTECH, PACKAGE, NOW, json, DEV_CONTEXT, mUpdateSignalsApiCalledStats); in testUpdatesProcessorSingleInsertJsonArray() 213 .insertAndDelete(ADTECH, NOW, expected, Collections.emptyList()); in testUpdatesProcessorSingleInsertJsonArray() 239 ADTECH, PACKAGE, NOW, json, DEV_CONTEXT, mUpdateSignalsApiCalledStats); in testUpdatesProcessorSingleRemove() 243 .insertAndDelete(ADTECH, NOW, Collections.emptyList(), Arrays.asList(toRemove)); in testUpdatesProcessorSingleRemove() [all …]
|
D | SignalsFixture.java | 62 public static final Instant NOW = CommonFixture.FIXED_NOW; field in SignalsFixture 84 .setCreationTime(NOW) in createSignal() 95 .setCreationTime(NOW) in createSignal() 119 builder.setBuyer(ADTECH).setPackageName(PACKAGE).setCreationTime(NOW).build()); in assertSignalsBuilderUnorderedListEquals() 123 builder.setBuyer(ADTECH).setPackageName(PACKAGE).setCreationTime(NOW).build()); in assertSignalsBuilderUnorderedListEquals()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/backgroundread/ |
D | BackgroundReadTest.java | 22 import static android.healthconnect.cts.utils.DataFactory.NOW; 118 String insertedId = insertStepsRecordViaTestApp(mContext, NOW, NOW.plus(1, MINUTES), 10); in testReadRecordsByFilters_inBackgroundWithoutPermission_canReadOwnData() 136 insertStepsRecordViaTestApp(mContext, NOW, NOW.plus(1, MINUTES), 10); in testReadRecordsByFilters_inBackgroundWithPermission_canReadBothOwnAndOtherAppsData() 156 insertStepsRecordViaTestApp(mContext, NOW, NOW.plus(1, MINUTES), 10); in testReadRecordsByIds_inBackgroundWithoutPermission_canReadOnlyOwnData() 175 insertStepsRecordViaTestApp(mContext, NOW, NOW.plus(1, MINUTES), 10); in testReadRecordsByIds_inBackgroundWithPermission_canReadBothOwnAndOtherAppsData() 195 insertStepsRecordViaTestApp(mContext, NOW, NOW.plus(1, MINUTES), 10); in testAggregate_inBackgroundWithoutPermission_expectSecurityError()
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utiltests/ |
D | DatePickerFactoryTest.kt | 24 import com.android.healthconnect.controller.tests.utils.NOW 47 val selectedDate = NOW in create_respectSelectedDate() 48 val maxDate = NOW.plus(ofDays(10)) in create_respectSelectedDate() 63 val selectedDate = NOW in create_respectMaxDate() 64 val maxDate = NOW.plus(ofDays(10)) in create_respectMaxDate()
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissiontypes/api/ |
D | LoadPermissionTypesUseCaseTest.kt | 19 import com.android.healthconnect.controller.tests.utils.NOW in <lambda>() 107 NOW, in <lambda>() 108 NOW.plusSeconds(samples.size.toLong() + 1), in <lambda>() 110 StepsCadenceRecord.StepsCadenceRecordSample(rate, NOW.plusSeconds(1)) in <lambda>() 122 return ExerciseSessionRecord.Builder(getMetaData(), NOW, NOW.plusSeconds(1000), type) in <lambda>()
|
D | LoadContributingAppsUseCaseTest.kt | 19 import com.android.healthconnect.controller.tests.utils.NOW in <lambda>() 116 NOW, in <lambda>() 117 NOW.plusSeconds(samples.size.toLong() + 1), in <lambda>() 119 StepsCadenceRecord.StepsCadenceRecordSample(rate, NOW.plusSeconds(1)) in <lambda>() 131 return ExerciseSessionRecord.Builder(getMetaData(), NOW, NOW.plusSeconds(1000), type) in <lambda>()
|
D | FilterPermissionTypesUseCaseTest.kt | 19 import com.android.healthconnect.controller.tests.utils.NOW in <lambda>() 139 NOW, in <lambda>() 140 NOW.plusSeconds(samples.size.toLong() + 1), in <lambda>() 142 StepsCadenceRecord.StepsCadenceRecordSample(rate, NOW.plusSeconds(1)) in <lambda>() 154 return ExerciseSessionRecord.Builder(getMetaData(), NOW, NOW.plusSeconds(1000), type) in <lambda>()
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/dataentries/ |
D | DateNavigationViewTest.kt | 25 import com.android.healthconnect.controller.tests.utils.NOW 86 dateNavigationView.setDate(NOW.minus(Duration.ofDays(1))) in setDate_changesSelectedDateView() 93 dateNavigationView.setDate(NOW.minus(Duration.ofDays(1))) in setDate_withValidFutureDates_nextButtonIsEnabled() 100 dateNavigationView.setDate(NOW.plus(Duration.ofDays(1))) in setDate_plannedExerciseEntriesAvailable_nextButtonIsEnabled() 110 val newDate = NOW.minus(Duration.ofDays(1)) in onDateChanged_listenerIsCalled()
|
/packages/modules/RemoteKeyProvisioning/app/tests/unit/src/com/android/rkpdapp/unittest/ |
D | ProvisionerTest.java | 70 private static final Instant NOW = Instant.now().truncatedTo(ChronoUnit.SECONDS); field in ProvisionerTest 145 Instant expirationTime = NOW.plus(Duration.ofDays(1)); in generateCertificateChain() 160 Instant expiration = NOW.plus(Duration.ofDays(1)); in setUpClearAttestationKeyTests() 187 Instant failureTimeStart = NOW.minus(Duration.ofDays(5)); in testProvisionerClearsAttestationKeysOnResponse() 188 Instant failureTimeEnd = NOW.minus(Duration.ofDays(2)); in testProvisionerClearsAttestationKeysOnResponse() 205 Instant failureTimeStart = NOW.minus(Duration.ofDays(5)); in testProvisionerClearsAttestationKeysOnlyOnce() 206 Instant failureTimeEnd = NOW.minus(Duration.ofDays(2)); in testProvisionerClearsAttestationKeysOnlyOnce()
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/ |
D | TestConstants.kt | 67 val NOW: Instant = Instant.parse("2022-10-20T07:06:05.432Z") in <lambda>() constant 70 fun getHeartRateRecord(heartRateValues: List<Long>, startTime: Instant = NOW): HeartRateRecord { in <lambda>() 75 heartRateValues.map { HeartRateRecord.HeartRateSample(it, NOW) }) in <lambda>() 79 fun getStepsRecord(steps: Long, time: Instant = NOW): StepsRecord { in getStepsRecord() 85 return BasalMetabolicRateRecord.Builder(getMetaData(), NOW, Power.fromWatts(watts)).build() in getBasalMetabolicRateRecord() 88 fun getDistanceRecord(distance: Length, time: Instant = NOW): DistanceRecord { in getDistanceRecord() 92 fun getTotalCaloriesBurnedRecord(calories: Energy, time: Instant = NOW): TotalCaloriesBurnedRecord { in getTotalCaloriesBurnedRecord() 97 fun getSleepSessionRecord(startTime: Instant = NOW): SleepSessionRecord { in getSleepSessionRecord() 106 fun getWeightRecord(time: Instant = NOW, weight: Mass): WeightRecord { in getWeightRecord() 206 getMetaData(), exerciseType, NOW, NOW.plusSeconds(3600)) in basePlannedExerciseSession()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/signals/updateprocessors/ |
D | AppendTest.java | 30 import static com.android.adservices.service.signals.SignalsFixture.NOW; 172 createSignal(KEY_1, VALUE_1, ID_1, NOW.minus(Duration.ofDays(1))); in testOverwriteExisting() 173 DBProtectedSignal toKeep = createSignal(KEY_1, VALUE_2, ID_2, NOW); in testOverwriteExisting() 199 createSignal(KEY_1, VALUE_1, ID_1, NOW.minus(Duration.ofDays(1))); in testOverwriteMultipleExisting() 201 createSignal(KEY_1, VALUE_1, ID_2, NOW.minus(Duration.ofDays(2))); in testOverwriteMultipleExisting() 202 DBProtectedSignal toKeep = createSignal(KEY_1, VALUE_2, ID_3, NOW); in testOverwriteMultipleExisting() 230 createSignal(KEY_1, VALUE_1, ID_1, NOW.minus(Duration.ofDays(1))); in testAddToExisting() 231 DBProtectedSignal existing2 = createSignal(KEY_1, VALUE_2, ID_1, NOW); in testAddToExisting()
|