Loading tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingAboutContentControllerTest.kt +7 −4 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ import android.telephony.TelephonyManager import androidx.preference.PreferenceManager import androidx.preference.PreferenceScreen import androidx.test.core.app.ApplicationProvider import com.android.settings.R import com.android.settings.network.telephony.satellite.SatelliteSettingAboutContentController.Companion.PREF_KEY_ABOUT_SATELLITE_CONNECTIVITY import com.android.settings.testutils.ResourcesUtils import com.android.settingslib.widget.TopIntroPreference import com.google.common.truth.Truth.assertThat import org.junit.Before Loading Loading @@ -62,10 +62,13 @@ class SatelliteSettingAboutContentControllerTest { controller.displayPreference(screen) assertThat(preference.title).isEqualTo( "You can send and receive text messages and use some apps by satellite with an eligible Test Carrier account" assertThat(preference.title.toString()).isEqualTo( ResourcesUtils.getResourcesString( context, "description_about_satellite_setting", TEST_SIM_OPERATOR_NAME ) ) } private companion object { Loading tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceControllerTest.java +7 −6 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import androidx.test.core.app.ApplicationProvider; import androidx.test.ext.junit.runners.AndroidJUnit4; import com.android.settings.network.CarrierConfigCache; import com.android.settings.testutils.ResourcesUtils; import org.junit.Before; import org.junit.Rule; Loading Loading @@ -198,8 +199,8 @@ public class SatelliteSettingPreferenceControllerTest { preferenceScreen.addPreference(preference); mController.displayPreference(preferenceScreen); assertThat(preference.getSummary()).isEqualTo( "Send and receive text messages by satellite. Contact your carrier for details."); assertThat(preference.getSummary()).isEqualTo(ResourcesUtils.getResourcesString(mContext, "satellite_setting_summary_without_entitlement")); } @Test Loading @@ -219,8 +220,8 @@ public class SatelliteSettingPreferenceControllerTest { mController.mCarrierRoamingNtnModeCallback.onCarrierRoamingNtnAvailableServicesChanged( new int[]{SERVICE_TYPE_SMS}); assertThat(preference.getSummary()).isEqualTo( "Send and receive text messages by satellite. Included with your account."); assertThat(preference.getSummary()).isEqualTo(ResourcesUtils.getResourcesString(mContext, "satellite_setting_enabled_summary")); } @Test Loading @@ -243,7 +244,7 @@ public class SatelliteSettingPreferenceControllerTest { mController.mCarrierRoamingNtnModeCallback.onCarrierRoamingNtnAvailableServicesChanged( new int[]{}); assertThat(preference.getSummary()).isEqualTo( "Send and receive text messages by satellite. Not included with your account."); assertThat(preference.getSummary()).isEqualTo(ResourcesUtils.getResourcesString(mContext, "satellite_setting_disabled_summary")); } } Loading
tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingAboutContentControllerTest.kt +7 −4 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ import android.telephony.TelephonyManager import androidx.preference.PreferenceManager import androidx.preference.PreferenceScreen import androidx.test.core.app.ApplicationProvider import com.android.settings.R import com.android.settings.network.telephony.satellite.SatelliteSettingAboutContentController.Companion.PREF_KEY_ABOUT_SATELLITE_CONNECTIVITY import com.android.settings.testutils.ResourcesUtils import com.android.settingslib.widget.TopIntroPreference import com.google.common.truth.Truth.assertThat import org.junit.Before Loading Loading @@ -62,10 +62,13 @@ class SatelliteSettingAboutContentControllerTest { controller.displayPreference(screen) assertThat(preference.title).isEqualTo( "You can send and receive text messages and use some apps by satellite with an eligible Test Carrier account" assertThat(preference.title.toString()).isEqualTo( ResourcesUtils.getResourcesString( context, "description_about_satellite_setting", TEST_SIM_OPERATOR_NAME ) ) } private companion object { Loading
tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceControllerTest.java +7 −6 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import androidx.test.core.app.ApplicationProvider; import androidx.test.ext.junit.runners.AndroidJUnit4; import com.android.settings.network.CarrierConfigCache; import com.android.settings.testutils.ResourcesUtils; import org.junit.Before; import org.junit.Rule; Loading Loading @@ -198,8 +199,8 @@ public class SatelliteSettingPreferenceControllerTest { preferenceScreen.addPreference(preference); mController.displayPreference(preferenceScreen); assertThat(preference.getSummary()).isEqualTo( "Send and receive text messages by satellite. Contact your carrier for details."); assertThat(preference.getSummary()).isEqualTo(ResourcesUtils.getResourcesString(mContext, "satellite_setting_summary_without_entitlement")); } @Test Loading @@ -219,8 +220,8 @@ public class SatelliteSettingPreferenceControllerTest { mController.mCarrierRoamingNtnModeCallback.onCarrierRoamingNtnAvailableServicesChanged( new int[]{SERVICE_TYPE_SMS}); assertThat(preference.getSummary()).isEqualTo( "Send and receive text messages by satellite. Included with your account."); assertThat(preference.getSummary()).isEqualTo(ResourcesUtils.getResourcesString(mContext, "satellite_setting_enabled_summary")); } @Test Loading @@ -243,7 +244,7 @@ public class SatelliteSettingPreferenceControllerTest { mController.mCarrierRoamingNtnModeCallback.onCarrierRoamingNtnAvailableServicesChanged( new int[]{}); assertThat(preference.getSummary()).isEqualTo( "Send and receive text messages by satellite. Not included with your account."); assertThat(preference.getSummary()).isEqualTo(ResourcesUtils.getResourcesString(mContext, "satellite_setting_disabled_summary")); } }