Home
last modified time | relevance | path

Searched refs:queryBuilder (Results 1 – 7 of 7) sorted by relevance

/cts/common/device-side/bedstead/testapp/src/test/java/com/android/bedstead/testapp/
DTestAppProviderTest.java265 static QueryBuilder queryBuilder() { in queryBuilder() method in TestAppProviderTest
558 Query queryAnnotation = queryBuilder() in query_queryAnnotationSpecifiesPackageName_matches()
562 TestAppQueryBuilder queryBuilder = mTestAppProvider.query(queryAnnotation); in query_queryAnnotationSpecifiesPackageName_matches() local
564 assertThat(queryBuilder.mPackageName.matches(STRING_VALUE)).isTrue(); in query_queryAnnotationSpecifiesPackageName_matches()
565 assertThat(queryBuilder.mPackageName.matches(DIFFERENT_STRING_VALUE)).isFalse(); in query_queryAnnotationSpecifiesPackageName_matches()
570 Query queryAnnotation = queryBuilder() in query_queryAnnotationSpecifiesTargetSdkVersion_matches()
574 TestAppQueryBuilder queryBuilder = mTestAppProvider.query(queryAnnotation); in query_queryAnnotationSpecifiesTargetSdkVersion_matches() local
576 assertThat(queryBuilder.mTargetSdkVersion.matches(INTEGER_VALUE)).isTrue(); in query_queryAnnotationSpecifiesTargetSdkVersion_matches()
577 assertThat(queryBuilder.mTargetSdkVersion.matches(HIGHER_INTEGER_VALUE)).isFalse(); in query_queryAnnotationSpecifiesTargetSdkVersion_matches()
582 Query queryAnnotation = queryBuilder() in query_queryAnnotationSpecifiesMaxSdkVersion_matches()
[all …]
DTestAppQueryBuilderTest.java39 assertThrows(IllegalStateException.class, () -> TestAppQueryBuilder.queryBuilder().get()); in get_emptyQueryBuilder_throwsException()
44 TestAppQueryBuilder b = TestAppQueryBuilder.queryBuilder(); in isEmptyQuery_isEmpty_returnsTrue()
51 TestAppQueryBuilder b = TestAppQueryBuilder.queryBuilder(); in isEmptyQuery_hasPackageNameQuery_returnsFalse()
59 TestAppQueryBuilder b = TestAppQueryBuilder.queryBuilder(); in isEmptyQuery_hasLabelQuery_returnsFalse()
67 TestAppQueryBuilder b = TestAppQueryBuilder.queryBuilder(); in isEmptyQuery_hasMetadata_returnsFalse()
75 TestAppQueryBuilder b = TestAppQueryBuilder.queryBuilder(); in isEmptyQuery_hasMinSdkVersion_returnsFalse()
83 TestAppQueryBuilder b = TestAppQueryBuilder.queryBuilder(); in isEmptyQuery_hasMaxSdkVersion_returnsFalse()
91 TestAppQueryBuilder b = TestAppQueryBuilder.queryBuilder(); in isEmptyQuery_hasTargetSdkVersion_returnsFalse()
99 TestAppQueryBuilder b = TestAppQueryBuilder.queryBuilder(); in isEmptyQuery_hasActivities_returnsFalse()
107 TestAppQueryBuilder b = TestAppQueryBuilder.queryBuilder(); in isEmptyQuery_hasServices_returnsFalse()
[all …]
DTestAppActivitiesTest.java119 TestAppActivitiesQueryBuilder queryBuilder = sTestAppInstance.activities().query(); in queryBuilderIsEmpty_isEmpty_returnsTrue() local
121 assertThat(queryBuilder.isEmptyQuery()).isTrue(); in queryBuilderIsEmpty_isEmpty_returnsTrue()
126 TestAppActivitiesQueryBuilder queryBuilder = sTestAppInstance.activities().query(); in queryBuilderIsEmpty_hasActivityQuery_returnsFalse() local
128 queryBuilder.whereActivity().activityClass().className().isNull(); in queryBuilderIsEmpty_hasActivityQuery_returnsFalse()
130 assertThat(queryBuilder.isEmptyQuery()).isFalse(); in queryBuilderIsEmpty_hasActivityQuery_returnsFalse()
/cts/common/device-side/bedstead/testapp/src/library/main/java/com/android/bedstead/testapp/
DTestAppQueryBuilder.java68 public static TestAppQueryBuilder queryBuilder() { in queryBuilder() method in TestAppQueryBuilder
91 TestAppQueryBuilder queryBuilder = this; in applyAnnotation() local
92queryBuilder = queryBuilder.whereTargetSdkVersion().matchesAnnotation(query.targetSdkVersion()); in applyAnnotation()
93 queryBuilder = queryBuilder.whereMinSdkVersion().matchesAnnotation(query.minSdkVersion()); in applyAnnotation()
94 queryBuilder = queryBuilder.whereMaxSdkVersion().matchesAnnotation(query.maxSdkVersion()); in applyAnnotation()
95 queryBuilder = queryBuilder.wherePackageName().matchesAnnotation(query.packageName()); in applyAnnotation()
96 queryBuilder = queryBuilder.whereIsDeviceAdmin().matchesAnnotation(query.isDeviceAdmin()); in applyAnnotation()
97 queryBuilder = queryBuilder.whereIsHeadlessDOSingleUser().matchesAnnotation( in applyAnnotation()
99 return queryBuilder; in applyAnnotation()
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/
DPolicy.java61 import static com.android.bedstead.testapp.TestAppQueryBuilder.queryBuilder;
624 ensureTestAppInstalled(DELEGATE_KEY, queryBuilder()
641 queryBuilder()
849 queryBuilder()
867 queryBuilder()
DDeviceState.java890 TestAppQueryBuilder queryBuilder = new TestAppProvider().query(query);
892 return queryBuilder;
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DUsageStatsTest.java2489 UsageEventsQuery.Builder queryBuilder = new UsageEventsQuery.Builder(startTime, endTime); in testUsageEventsQueryParceling() local
2490 queryBuilder.setEventTypes(rnd.nextInt(Event.MAX_EVENT_TYPE + 1), in testUsageEventsQueryParceling()
2492 queryBuilder.setPackageNames(fakePackageName + "2", in testUsageEventsQueryParceling()
2494 UsageEventsQuery query = queryBuilder.build(); in testUsageEventsQueryParceling()