Home
last modified time | relevance | path

Searched refs:NOW (Results 1 – 25 of 81) sorted by relevance

1234

/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/data/entries/datenavigation/
DDateNavigationViewTest.kt28 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/
DSleepSessionFormatterTest.kt33 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 …]
DExerciseSessionFormatterTest.kt34 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()
DMenstruationPeriodFormatterTest.kt28 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()
DPowerFormatterTest.kt25 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()
DCyclingPedalingCadenceFormatterTest.kt25 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>()
DStepsCadenceFormatterTest.kt24 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>()
DFloorsFormatterTest.kt23 import com.android.healthconnect.controller.tests.utils.NOW
72 return FloorsClimbedRecord.Builder(getMetaData(), NOW, NOW.plusSeconds(2), floors).build() in getRecord()
DWheelchairPushesFormatterTest.kt23 import com.android.healthconnect.controller.tests.utils.NOW
92 return WheelchairPushesRecord.Builder(getMetaData(), NOW, NOW.plusSeconds(10), count) in getRecord()
DActiveCaloriesBurnedFormatterTest.kt24 import com.android.healthconnect.controller.tests.utils.NOW
87 getMetaData(), NOW, NOW.plusSeconds(1), Energy.fromCalories(calories)) in getActiveCaloriesBurnedRecord()
DTotalCaloriesBurnedFormatterTest.kt24 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/
DFederatedComputeEncryptionKeyTest.java37 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()
DODPAuthorizationTokenTest.java37 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/
DDataFactory.java68 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/
DUpdateProcessingOrchestratorTest.java77 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 …]
DSignalsFixture.java62 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/
DBackgroundReadTest.java22 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/
DDatePickerFactoryTest.kt24 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/
DLoadPermissionTypesUseCaseTest.kt19 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>()
DLoadContributingAppsUseCaseTest.kt19 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>()
DFilterPermissionTypesUseCaseTest.kt19 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/
DDateNavigationViewTest.kt25 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/
DProvisionerTest.java70 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/
DTestConstants.kt67 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/
DAppendTest.java30 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()

1234