Merge "Update mocking to correct target methods" am: efa884758b am: b64bf233a3 am: 7dce573e9d

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1644306

Change-Id: I99179fe4a754849f50f6b06ce9b7424a88478184
This commit is contained in:
Chiachang Wang
2021-03-18 15:14:07 +00:00
committed by Automerger Merge Worker
3 changed files with 25 additions and 32 deletions

View File

@@ -74,7 +74,7 @@ public class MobileNetworkSettingsTest {
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = spy(RuntimeEnvironment.application);
when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager);
when(mActivity.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager);
when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager);
when(mContext.getSystemService(NetworkStatsManager.class)).thenReturn(mNetworkStatsManager);
ShadowEntityHeaderController.setUseMock(mock(EntityHeaderController.class));