Merge "Fix CdmaSystemSelectPreferenceControllerTest" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
3c32c3e2f1
@@ -38,7 +38,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
|||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
@@ -66,6 +65,7 @@ public class CdmaSystemSelectPreferenceControllerTest {
|
|||||||
mContext = spy(ApplicationProvider.getApplicationContext());
|
mContext = spy(ApplicationProvider.getApplicationContext());
|
||||||
when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager);
|
when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager);
|
||||||
doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID);
|
doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID);
|
||||||
|
when(mTelephonyManager.getPhoneType()).thenReturn(TelephonyManager.PHONE_TYPE_CDMA);
|
||||||
|
|
||||||
mPreference = new ListPreference(mContext);
|
mPreference = new ListPreference(mContext);
|
||||||
mController = new CdmaSystemSelectPreferenceController(mContext, "mobile_data");
|
mController = new CdmaSystemSelectPreferenceController(mContext, "mobile_data");
|
||||||
@@ -100,7 +100,6 @@ public class CdmaSystemSelectPreferenceControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore("b/337417544")
|
|
||||||
public void updateState_stateHome_displayHome() {
|
public void updateState_stateHome_displayHome() {
|
||||||
doReturn(TelephonyManager.CDMA_ROAMING_MODE_HOME).when(
|
doReturn(TelephonyManager.CDMA_ROAMING_MODE_HOME).when(
|
||||||
mTelephonyManager).getCdmaRoamingMode();
|
mTelephonyManager).getCdmaRoamingMode();
|
||||||
@@ -112,7 +111,6 @@ public class CdmaSystemSelectPreferenceControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore("b/337417897")
|
|
||||||
public void updateState_LteGSMWcdma_disabled() {
|
public void updateState_LteGSMWcdma_disabled() {
|
||||||
doReturn(TelephonyManager.CDMA_ROAMING_MODE_HOME).when(
|
doReturn(TelephonyManager.CDMA_ROAMING_MODE_HOME).when(
|
||||||
mTelephonyManager).getCdmaRoamingMode();
|
mTelephonyManager).getCdmaRoamingMode();
|
||||||
@@ -126,7 +124,6 @@ public class CdmaSystemSelectPreferenceControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore("b/337417917")
|
|
||||||
public void updateState_stateOther_resetToDefault() {
|
public void updateState_stateOther_resetToDefault() {
|
||||||
Settings.Global.putInt(mContext.getContentResolver(),
|
Settings.Global.putInt(mContext.getContentResolver(),
|
||||||
Settings.Global.CDMA_ROAMING_MODE,
|
Settings.Global.CDMA_ROAMING_MODE,
|
||||||
|
Reference in New Issue
Block a user