Home
last modified time | relevance | path

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

/packages/apps/Settings/tests/spa_unit/src/com/android/settings/network/
DMobileNetworkListFragmentTest.kt38 private val mockResources = mock<Resources>() constant in com.android.settings.network.MobileNetworkListFragmentTest
42 on { resources } doReturn mockResources in <lambda>()
50 mockResources.stub { in isPageSearchEnabled_adminUser_shouldReturnTrue()
65 mockResources.stub { in isPageSearchEnabled_nonAdminUser_shouldReturnFalse()
DBluetoothWiFiResetPreferenceControllerTest.kt53 private val mockResources = mock<Resources>() constant in com.android.settings.network.BluetoothWiFiResetPreferenceControllerTest
61 on { resources } doReturn mockResources in <lambda>()
97 mockResources.stub { in resetOperation_onDeviceWithSimVisible_notResetConnectivity()
108 mockResources.stub { in resetOperation_onDeviceWithSimInvisible_resetVpn()
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/
DAppFilterTest.kt39 private lateinit var mockResources: Resources variable in com.android.launcher3.AppFilterTest
46 `when`(mockContext.resources).thenReturn(mockResources) // Link the context and resources in setUp()
47 `when`(mockResources.getStringArray(R.array.filtered_components)) in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/
DZenRuleVisEffectPreferenceControllerTest.java102 Resources mockResources = mock(Resources.class); in isAvailable() local
103 when(mockContext.getResources()).thenReturn(mockResources); in isAvailable()
105 when(mockResources.getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed)) in isAvailable()
109 when(mockResources.getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed)) in isAvailable()
DZenModeVisEffectPreferenceControllerTest.java102 Resources mockResources = mock(Resources.class); in isAvailable() local
103 when(mockContext.getResources()).thenReturn(mockResources); in isAvailable()
105 when(mockResources.getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed)) in isAvailable()
109 when(mockResources.getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed)) in isAvailable()
/packages/apps/Nfc/tests/unit/src/com/android/nfc/
DDeviceConfigFacadeTest.java79 Resources mockResources = mock(Resources.class); in getMockedContext() local
80 when(mockResources.getBoolean(eq(R.bool.enable_antenna_blocked_alert))) in getMockedContext()
88 return mockResources; in getMockedContext()
DNfcBlockedNotificationTest.java77 Resources mockResources = Mockito.mock(Resources.class); in setUp() local
78 when(mockResources.getBoolean(eq(R.bool.tag_intent_app_pref_supported))) in setUp()
94 return mockResources; in setUp()
DNfcDeveloperOptionNotificationTest.java86 Resources mockResources = Mockito.mock(Resources.class); in setUp() local
87 when(mockResources.getBoolean(eq(R.bool.tag_intent_app_pref_supported))) in setUp()
103 return mockResources; in setUp()
DDtaServiceConnectorTest.java82 Resources mockResources = Mockito.mock(Resources.class); in setUp() local
83 when(mockResources.getBoolean(eq(R.bool.tag_intent_app_pref_supported))) in setUp()
108 return mockResources; in setUp()
DRegisteredComponentCacheTest.java82 Resources mockResources = mock(Resources.class); in setUp() local
83 when(mockResources.getBoolean(eq(R.bool.tag_intent_app_pref_supported))) in setUp()
99 return mockResources; in setUp()
DNfcWifiProtectedSetupTest.java102 Resources mockResources = Mockito.mock(Resources.class); in setUp() local
103 when(mockResources.getBoolean(eq(R.bool.tag_intent_app_pref_supported))) in setUp()
119 return mockResources; in setUp()
DNfcReaderConflictOccurredTest.java96 Resources mockResources = Mockito.mock(Resources.class); in setUp() local
97 when(mockResources.getBoolean(eq(R.bool.tag_intent_app_pref_supported))) in setUp()
119 return mockResources; in setUp()
DNfcDispatcherTest.java92 Resources mockResources = Mockito.mock(Resources.class); in setUp() local
93 when(mockResources.getBoolean(eq(R.bool.tag_intent_app_pref_supported))) in setUp()
109 return mockResources; in setUp()
/packages/apps/CellBroadcastReceiver/tests/unit/src/com/android/cellbroadcastreceiver/unit/
DCellBroadcastSettingsTest.java213 Resources mockResources = mock(Resources.class); in testGetResources() local
215 doReturn(mockResources).when(mockContext).getResources(); in testGetResources()
216 doReturn(configuration).when(mockResources).getConfiguration(); in testGetResources()
229 doReturn(mockResources).when(mockContext2).getResources(); in testGetResources()
269 doReturn(configuration2).when(mockResources).getConfiguration(); in testGetResources()
280 Resources mockResources = mock(Resources.class); in testGetResourcesByOperator() local
281 doReturn(mockResources).when(mockContext).getResources(); in testGetResourcesByOperator()
292 doReturn(mockResources).when(mockContext2).getResources(); in testGetResourcesByOperator()
DCellBroadcastAlertServiceTest.java578 Resources mockResources = mock(Resources.class); in testShouldDisplayMessage() local
579 doReturn(mockResources).when(mockContext).getResources(); in testShouldDisplayMessage()
584 doReturn(true).when(mockResources).getBoolean( in testShouldDisplayMessage()
595 doReturn(false).when(mockResources).getBoolean( in testShouldDisplayMessage()
/packages/apps/Launcher3/quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/navbutton/
DNavButtonLayoutFactoryTest.kt35 private val mockResources: Resources = mock() constant in com.android.launcher3.taskbar.navbutton.NavButtonLayoutFactoryTest
61 whenever(mockBackButton.resources).thenReturn(mockResources) in setup()
62 whenever(mockResources.configuration).thenReturn(mockConfiguration) in setup()
203 resources = mockResources, in getLayoutter()
/packages/services/Car/tests/CustomizationTool/tests/src/com/android/car/customization/tool/domain/menu/
DMenuControllerTest.kt67 val mockResources: Resources = mock() in expect_exception_when_menu_has_duplicate_ids() constant
68 `when`(mockResources.getResourceName(Mockito.anyInt())).thenReturn("mock") in expect_exception_when_menu_has_duplicate_ids()
69 `when`(mockContext.resources).thenReturn(mockResources) in expect_exception_when_menu_has_duplicate_ids()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/modes/
DZenModeNotifVisPreferenceControllerTest.java84 Resources mockResources = mock(Resources.class); in isAvailable() local
85 when(mockContext.getResources()).thenReturn(mockResources); in isAvailable()
87 when(mockResources.getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed)) in isAvailable()
91 when(mockResources.getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed)) in isAvailable()
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/lib/
DAppDataUsageRepositoryTest.kt57 private val mockResources = mock<Resources> { in <lambda>() constant
68 on { resources } doReturn mockResources in <lambda>()
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DCallTest.java130 Resources mockResources = mContext.getResources(); in setUp() local
131 when(mockResources.getBoolean(R.bool.skip_loading_canned_text_response)) in setUp()
133 when(mockResources.getBoolean(R.bool.skip_incoming_caller_info_query)) in setUp()
696 Resources mockResources = mContext.getResources(); in testGetFromCallerInfo_skipLookup() local
697 when(mockResources.getBoolean(R.bool.skip_incoming_caller_info_query)) in testGetFromCallerInfo_skipLookup()
1036 Resources mockResources = mContext.getResources(); in testSkipLoadingCannedTextResponse() local
1037 when(mockResources.getBoolean(R.bool.skip_loading_canned_text_response)) in testSkipLoadingCannedTextResponse()
DCallLogManagerTest.java311 Resources mockResources = mContext.getResources(); in testDontLogUnloggableNumbers() local
312 when(mockResources.getStringArray(com.android.internal.R.array.unloggable_phone_numbers)) in testDontLogUnloggableNumbers()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DAutomaticOnOffKeepaliveTrackerTest.java332 final Resources mockResources = mock(Resources.class); in setup() local
333 doReturn(mockResources).when(mCtx).getResources(); in setup()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/
DAdapterServiceTest.java597 Resources mockResources = mock(Resources.class); in testEnableDisableOnlyGatt() local
602 when(mockContext.getResources()).thenReturn(mockResources); in testEnableDisableOnlyGatt()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/
DWifiPermissionsUtilTest.java1874 Resources mockResources = mock(Resources.class);
1875 when(mockResources.getStringArray(R.array.config_oemPrivilegedWifiAdminPackages))
1877 when(mMockContext.getResources()).thenReturn(mockResources);
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/
DPickerSyncControllerTest.java1941 Resources mockResources = mock(Resources.class); in createControllerWithDefaultProvider() local
1944 when(mockContext.getResources()).thenReturn(mockResources); in createControllerWithDefaultProvider()