Renew the testcase for using new api setDataEnabledForReason
Bug: 318310357 Change-Id: Ia800ab2727747e5f2d979051a3ffd7fe4ce92ed9 Test: test the MobileDataSliceTest
This commit is contained in:
@@ -114,7 +114,8 @@ public class MobileDataSliceTest {
|
|||||||
|
|
||||||
mMobileDataSlice.onNotifyChange(intent);
|
mMobileDataSlice.onNotifyChange(intent);
|
||||||
|
|
||||||
verify(mTelephonyManager).setDataEnabled(true);
|
verify(mTelephonyManager)
|
||||||
|
.setDataEnabledForReason(TelephonyManager.DATA_ENABLED_REASON_USER, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -126,7 +127,8 @@ public class MobileDataSliceTest {
|
|||||||
|
|
||||||
mMobileDataSlice.onNotifyChange(intent);
|
mMobileDataSlice.onNotifyChange(intent);
|
||||||
|
|
||||||
verify(mTelephonyManager).setDataEnabled(false);
|
verify(mTelephonyManager)
|
||||||
|
.setDataEnabledForReason(TelephonyManager.DATA_ENABLED_REASON_USER, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -138,7 +140,8 @@ public class MobileDataSliceTest {
|
|||||||
|
|
||||||
mMobileDataSlice.onNotifyChange(intent);
|
mMobileDataSlice.onNotifyChange(intent);
|
||||||
|
|
||||||
verify(mTelephonyManager, times(0)).setDataEnabled(true);
|
verify(mTelephonyManager, times(0))
|
||||||
|
.setDataEnabledForReason(TelephonyManager.DATA_ENABLED_REASON_USER, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user