summaryrefslogtreecommitdiff
path: root/test-mock/tests/src
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@google.com> 2023-11-29 12:17:43 -0700
committer Jeff Sharkey <jsharkey@google.com> 2023-11-29 12:17:47 -0700
commitde3447105cdc56c6d84b690567c2a30f134c3284 (patch)
treec20495c83a5d4cccb1001e4d328ca062d2e70c65 /test-mock/tests/src
parent3c941e1af17f1ab705bd4c328d7174c4903a398f (diff)
Verify `android.test.mock` under Ravenwood.
Even though developers are encouraged to use Mockito, existing tests may still be using this old library for their mocking. We'll circle back later to consider support for components such as ContentProvider, Service, etc. Clean up OWNERS. Bug: 310268946 Test: atest android.test.mock.ravenwood.tests Change-Id: Ie3f4ccea9cf6719d61cff277a627825868edc992
Diffstat (limited to 'test-mock/tests/src')
-rw-r--r--test-mock/tests/src/android/test/mock/MockContextTest.java30
-rw-r--r--test-mock/tests/src/android/test/mock/MockPackageManagerTest.java30
2 files changed, 60 insertions, 0 deletions
diff --git a/test-mock/tests/src/android/test/mock/MockContextTest.java b/test-mock/tests/src/android/test/mock/MockContextTest.java
new file mode 100644
index 000000000000..6e28267de46d
--- /dev/null
+++ b/test-mock/tests/src/android/test/mock/MockContextTest.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.test.mock;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class MockContextTest {
+ @Test
+ public void testConstructor() {
+ new MockContext();
+ }
+}
diff --git a/test-mock/tests/src/android/test/mock/MockPackageManagerTest.java b/test-mock/tests/src/android/test/mock/MockPackageManagerTest.java
new file mode 100644
index 000000000000..5b860f169193
--- /dev/null
+++ b/test-mock/tests/src/android/test/mock/MockPackageManagerTest.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.test.mock;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class MockPackageManagerTest {
+ @Test
+ public void testConstructor() {
+ new MockPackageManager();
+ }
+}