/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/device/src/android/healthconnect/cts/device/ |
D | HealthConnectChangeLogsDeviceTests.java | 89 String recordIdInsertedByAppA = APP_A_WITH_READ_WRITE_PERMS.insertRecord(getStepsRecord()); in testChangeLogs_insert_multipleApps_noFilter_returnsUpsertLogsForAllApps() 90 String recordIdInsertedByAppB = APP_B_WITH_READ_WRITE_PERMS.insertRecord(getStepsRecord()); in testChangeLogs_insert_multipleApps_noFilter_returnsUpsertLogsForAllApps() 128 String recordIdInsertedByAppA = APP_A_WITH_READ_WRITE_PERMS.insertRecord(getStepsRecord()); in testChangeLogs_insert_multipleApps_filterDataOrigin_returnsUpsertLogs() 129 APP_A_WITH_READ_WRITE_PERMS.insertRecord(getStepsRecord()); in testChangeLogs_insert_multipleApps_filterDataOrigin_returnsUpsertLogs() 153 String recordIdInsertedByAppA = APP_A_WITH_READ_WRITE_PERMS.insertRecord(getStepsRecord()); in testChangeLogs_insertAndDelete_multipleApps_noFilter_returnsDeletedLogsForAllApps() 154 String recordIdInsertedByAppB = APP_B_WITH_READ_WRITE_PERMS.insertRecord(getStepsRecord()); in testChangeLogs_insertAndDelete_multipleApps_noFilter_returnsDeletedLogsForAllApps() 183 String recordIdInsertedByAppA = APP_A_WITH_READ_WRITE_PERMS.insertRecord(getStepsRecord()); in testChangeLogs_insertAndDelete_multipleApps_filterDataOrigin_returnsDeletedLogs() 184 String recordIdInsertedByAppB = APP_B_WITH_READ_WRITE_PERMS.insertRecord(getStepsRecord()); in testChangeLogs_insertAndDelete_multipleApps_filterDataOrigin_returnsDeletedLogs() 197 private static StepsRecord getStepsRecord() { in getStepsRecord() method in HealthConnectChangeLogsDeviceTests
|
D | HealthConnectDeviceTest.java | 130 getStepsRecord(getEmptyMetadata()), 151 getStepsRecord( 157 getStepsRecord( 191 StepsRecord record = getStepsRecord(getEmptyMetadata()); in testAppWithNormalReadWritePermCanInsertRecord() 197 StepsRecord record = getStepsRecord(getEmptyMetadata()); in testAnAppCantDeleteAnotherAppEntry() 211 StepsRecord record = getStepsRecord(getEmptyMetadata()); in testAnAppCantUpdateAnotherAppEntry() 213 StepsRecord updatedRecord = getStepsRecord(getMetadataForId(recordId)); in testAnAppCantUpdateAnotherAppEntry() 246 StepsRecord record = getStepsRecord(getEmptyMetadata()); in testAppWithWritePermsOnly_readOwnData_success() 259 getStepsRecord( in testAppWithWritePermsOnly_readOwnData_success() 268 StepsRecord record = getStepsRecord(getEmptyMetadata()); in testAppWithWritePermsOnly_readDataFromAllApps_throwsError() [all …]
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/ |
D | StepsRecordTest.java | 392 Arrays.asList(DataFactory.getStepsRecord(), DataFactory.getStepsRecord()); in testStepsRecordUsingFilters_nextPageTokenEnd() 843 getStepsRecord(1000, 1, 1), in testStepsCountAggregation_groupByDurationWithInstantFilter() 844 getStepsRecord(1000, 2, 1), in testStepsCountAggregation_groupByDurationWithInstantFilter() 845 getStepsRecord(1000, 3, 1), in testStepsCountAggregation_groupByDurationWithInstantFilter() 846 getStepsRecord(1000, 4, 1), in testStepsCountAggregation_groupByDurationWithInstantFilter() 847 getStepsRecord(1000, 5, 1)); in testStepsCountAggregation_groupByDurationWithInstantFilter() 937 TestUtils.insertRecords(List.of(getStepsRecord(end, 100, 1, 2))); in testAggregation_groupByDurationInstant_halfSizeGroupResultIsCorrect() 960 Arrays.asList(getStepsRecord(1000, 1, 1), getStepsRecord(1000, 2, 1)); in testAggregation_StepsCountTotal_withDuplicateEntry() 972 Arrays.asList(getStepsRecord(1000, 3, 1), getStepsRecord(1000, 3, 1)); in testAggregation_StepsCountTotal_withDuplicateEntry() 1154 getStepsRecord(1000, 1, 1), in insertStepsRecordWithDelay() [all …]
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/changelogs/ |
D | HealthConnectChangeLogsTests.java | 27 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 358 List<Record> testRecords = ImmutableList.of(getStepsRecord(), getHeartRateRecord()); in testChangeLogs_insert_filterRecordType_returnsUpsertedLogs() 391 StepsRecord stepsRecord = getStepsRecord(/* steps = */ 10, "stepsId"); in testChangeLogs_insertAndDeleteByClientId_returnsDeletedLogsOnly() 488 insertRecords(ImmutableList.of(getStepsRecord(), getHeartRateRecord())); in testChangeLogs_insertAndDelete_recordFilter_onlyReturnsDeletedLogsForRecordType() 510 getStepsRecord( in testChangeLogs_insertAndUpdateById_returnsUpdateChangeLogOnly() 515 updateRecords(ImmutableList.of(getStepsRecord(/* steps= */ 123, insertedRecordMetadata))); in testChangeLogs_insertAndUpdateById_returnsUpdateChangeLogOnly() 520 .containsExactly(getStepsRecord(/* steps= */ 123, insertedRecordMetadata)); in testChangeLogs_insertAndUpdateById_returnsUpdateChangeLogOnly() 533 insertRecords(ImmutableList.of(getStepsRecord(/* steps= */ 10, "stepsId"))) in testChangeLogs_insertAndUpdateByClientId_returnsUpdateChangeLogOnly() 536 updateRecords(ImmutableList.of(getStepsRecord(/* steps= */ 123, "stepsId"))); in testChangeLogs_insertAndUpdateByClientId_returnsUpdateChangeLogOnly() 541 .containsExactly(getStepsRecord(/* steps= */ 123, insertedRecordMetadata)); in testChangeLogs_insertAndUpdateByClientId_returnsUpdateChangeLogOnly() [all …]
|
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/ |
D | DataFactory.java | 361 return getStepsRecord(10, getEmptyMetadata()); in getStepsRecordWithEmptyMetaData() 364 public static StepsRecord getStepsRecord() { in getStepsRecord() method in DataFactory 365 return getStepsRecord(10); in getStepsRecord() 369 public static StepsRecord getStepsRecord(long steps) { in getStepsRecord() method in DataFactory 370 return getStepsRecord(steps, generateMetadata()); in getStepsRecord() 374 public static StepsRecord getStepsRecord(long steps, String clientId) { in getStepsRecord() method in DataFactory 375 return getStepsRecord(steps, getMetadataForClientId(clientId)); in getStepsRecord() 379 public static StepsRecord getStepsRecord(long steps, Metadata metadata) { in getStepsRecord() method in DataFactory 384 public static StepsRecord getStepsRecord(long steps, Instant start, Instant end) { in getStepsRecord() method in DataFactory 389 public static StepsRecord getStepsRecord( in getStepsRecord() method in DataFactory [all …]
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/dataentries/formatters/ |
D | StepsFormatterTest.kt | 20 import com.android.healthconnect.controller.tests.utils.getStepsRecord 54 val record = getStepsRecord(10) in formatValue_returnsStepsValues() 62 val record = getStepsRecord(1) in formatValue_singleValue_returnsStepsValue() 70 val record = getStepsRecord(10) in formatA11yValue_returnsA11yStepsValue()
|
D | HealthDataEntryFormatterTest.kt | 28 import com.android.healthconnect.controller.tests.utils.getStepsRecord 78 val stepsRecord = getStepsRecord(12) in format_formatsStepsRateRecord()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/readdata/ |
D | OrderingTests.java | 20 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 119 getStepsRecord(200, startTime2, startTime2.plusMillis(1), "id2"), in ordering_ascendingNotSet_sortedByStartTimeInAscendingOrder() 120 getStepsRecord(100, startTime1, startTime1.plusMillis(1), "id1"), in ordering_ascendingNotSet_sortedByStartTimeInAscendingOrder() 121 getStepsRecord(300, startTime3, startTime3.plusMillis(1), "id3"))); in ordering_ascendingNotSet_sortedByStartTimeInAscendingOrder() 139 getStepsRecord(100, startTime, startTime.plusMillis(21), "id1"), in ordering_sameStartTime_sortedByRowIdAscending() 140 getStepsRecord(20, startTime, startTime.plusMillis(10), "id2"), in ordering_sameStartTime_sortedByRowIdAscending() 141 getStepsRecord(300, startTime, startTime.plusMillis(15), "id3"))); in ordering_sameStartTime_sortedByRowIdAscending()
|
D | ReadByFilterTests.java | 22 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 88 getStepsRecord(100, stepsId), in filterByDataType_dataOfOtherTypesExcluded() 125 getStepsRecord( in filterByDataOrigin_dataOfOtherOriginsExcluded() 154 getStepsRecord( in filterByDataOrigin_noFilterSet_allDataReturned() 167 insertRecords(List.of(getStepsRecord())); in filterByDataOrigin_invalidOrigin_emptyResult()
|
D | PaginationTests.java | 21 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 141 getStepsRecord(100, startTime, startTime.plusSeconds(500), "id1"), in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly() 142 getStepsRecord(100, startTime, startTime.plusSeconds(200), "id2"), in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly() 143 getStepsRecord(100, startTime, startTime.plusSeconds(400), "id3"), in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly() 144 getStepsRecord(100, startTime, startTime.plusSeconds(300), "id4"))); in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/aggregation/ |
D | AggregateWithFiltersTest.java | 34 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 109 getStepsRecord( in dataOriginFilter_noFilter_everythingIncluded() 132 getStepsRecord( in dataOriginFilter_validFilter_onlyDataFromFilteredApps() 157 getStepsRecord( in dataOriginFilter_invalidApp_noDataReturned() 205 getStepsRecord( in dataOriginFilter_appNotInPriorityList_noDataReturned() 290 getStepsRecord( in timeRangeFilter_noDataWithinTimeInterval_noDataReturned() 332 List.of(getStepsRecord(10, endTime.minusMillis(1000), endTime.plusMillis(1000)))); in timeRangeFilter_priorityType_outOfRangePriorityDataTrimmed() 402 getStepsRecord(123, Instant.EPOCH, Instant.ofEpochSecond(456)), in timeRangeFilter_openStartTime_aggregateDataFromEpoch() 404 getStepsRecord( in timeRangeFilter_openStartTime_aggregateDataFromEpoch() 434 getStepsRecord(666, now.minusMillis(1000), now.plusMillis(1000)), in timeRangeFilter_openEndTime_aggregateDataUntilFuture() [all …]
|
D | AggregationApisTest.java | 34 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 160 getStepsRecord(1234, time.plus(1, DAYS), time.plus(25, HOURS)), in aggregateWithInstantFilter_stepsCountTotal() 161 getStepsRecord(4321, time, time.plus(1, HOURS)))); in aggregateWithInstantFilter_stepsCountTotal()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ |
D | HealthConnectAccessLogsTest.java | 20 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 79 List<Record> testRecord = Collections.singletonList(getStepsRecord()); in testAccessLogs_read_singleRecordType() 117 Record record = getStepsRecord(); in testAccessLogs_update_singleRecordType() 144 Record stepsRecord = getStepsRecord(); in testAccessLogs_update_multipleRecordTypes() 177 List<Record> testRecord = Collections.singletonList(getStepsRecord()); in testAccessLogs_insert_singleRecordType()
|
D | HealthConnectManagerTest.java | 223 Collections.singletonList(DataFactory.getStepsRecord("abc"))); in testRandomIdWithInsert() 397 getStepsRecord( in testUpdateRecords_recordWithInvalidPackageName_noChangeInDataBase() 452 getStepsRecord(clientId, /* packageName= */ "", count1, startTime1, endTime1)); in testInsertRecords_intervalWithSameClientId_overwrites() 454 getStepsRecord(clientId, /* packageName= */ "", count2, startTime2, endTime2)); in testInsertRecords_intervalWithSameClientId_overwrites() 476 getStepsRecord( in testInsertRecords_intervalNoClientIdsAndSameTime_overwrites() 484 getStepsRecord( in testInsertRecords_intervalNoClientIdsAndSameTime_overwrites() 512 getStepsRecord( in testInsertRecords_intervalDifferentClientIdsAndSameTime_doesNotOverwrite() 520 getStepsRecord( in testInsertRecords_intervalDifferentClientIdsAndSameTime_doesNotOverwrite() 678 StepsRecord stepsRecord = DataFactory.getStepsRecord(20, metadata); in testInsertRecords_metadataGiven_responseDoesNotMutateMetadataReference() 700 getStepsRecord( in testAggregation_stepsCountTotal_acrossDST_works() [all …]
|
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/HealthConnectTestHelper/src/android/healthconnect/cts/testhelper/ |
D | HealthConnectServiceLogsTests.java | 30 import static android.healthconnect.cts.testhelper.TestHelperUtils.getStepsRecord; 112 List.of(getBloodPressureRecord(), getHeartRateRecord(), getStepsRecord()), in testHealthConnectUpdateRecords() 133 insertRecords(List.of(getBloodPressureRecord(), getStepsRecord()), mHealthConnectManager); in testHealthConnectDeleteRecords() 147 insertRecords(List.of(getBloodPressureRecord(), getStepsRecord()), mHealthConnectManager); in testHealthConnectDeleteRecordsError() 161 insertRecords(List.of(getStepsRecord()), mHealthConnectManager); in testHealthConnectReadRecords() 355 List.of(getStepsRecord(), getBloodPressureRecord(), getHeartRateRecord()), in testHealthConnectDatabaseStats()
|
D | DailyLogsTests.java | 22 import static android.healthconnect.cts.testhelper.TestHelperUtils.getStepsRecord; 57 getStepsRecord(), in testInsertRecordsSucceed()
|
D | HealthConnectUiTestHelper.kt | 92 TestHelperUtils.getStepsRecord()), in openHomeFragment()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/nopermission/ |
D | HealthConnectManagerNotAllPermissionsAreGrantedTest.java | 29 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 176 getStepsRecord(), in getTestRecords()
|
D | HealthConnectManagerNoPermissionsGrantedTest.java | 37 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 275 new Pair<>(getStepsRecord(), STEPS_COUNT_TOTAL), in testAggregate_noPermissions_expectError() 375 getStepsRecord(), in getTestRecords()
|
/packages/modules/HealthFitness/testapps/toolbox/src/com/android/healthconnect/testapps/toolbox/seed/ |
D | SeedData.kt | 69 val records = (1L..50).map { count -> getStepsRecord(count, start.plus(ofMinutes(count))) } in <lambda>() 163 private fun getStepsRecord(count: Long, time: Instant): StepsRecord { in <lambda>() method in com.android.healthconnect.testapps.toolbox.seed.SeedData
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/data/entries/api/ |
D | LoadDataEntriesUseCaseTest.kt | 21 import com.android.healthconnect.controller.tests.utils.getStepsRecord in <lambda>() 79 val stepsRecord = getStepsRecord(100, stepsDate.randomInstant()) in <lambda>()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/backgroundread/ |
D | BackgroundReadTest.java | 23 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 208 StepsRecord stepsRecord1 = getStepsRecord(value1); in testAggregate_inBackgroundWithPermission_canAggregateBothOwnAndOtherAppsData()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/historicaccess/ |
D | HistoricAccessLimitWithPermissionTest.java | 21 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 274 return insertRecordAndGetId(getStepsRecord(value, startTime, endTime)); in insertStepsRecord()
|
D | HistoricAccessLimitTest.java | 21 import static android.healthconnect.cts.utils.DataFactory.getStepsRecord; 445 return insertRecordAndGetId(getStepsRecord(value, startTime, endTime)); in insertStepsRecord()
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/ |
D | TestConstants.kt | 79 fun getStepsRecord(steps: Long, time: Instant = NOW): StepsRecord { in getStepsRecord() method 136 HealthPermissionType.STEPS -> getStepsRecord(Random.nextLong(0, 5000), date.randomInstant()) in getRandomRecord()
|