OSDN Git Service

Test for string changes in DND Sound Settings
authorBeverly <beverlyt@google.com>
Mon, 12 Mar 2018 18:35:27 +0000 (14:35 -0400)
committerBeverly <beverlyt@google.com>
Mon, 12 Mar 2018 18:35:27 +0000 (14:35 -0400)
Test: this
Change-Id: I47ba1d1bad6a5be04d718d2e58eaf5dd6c69f107
Fixes: 74529508

tests/robotests/src/com/android/settings/notification/ZenModeSettingsTest.java

index 5c81efc..bd94bf5 100644 (file)
@@ -47,27 +47,12 @@ public class ZenModeSettingsTest {
     }
 
     @Test
-    public void testGetBehaviorSettingSummary_customBehavior() {
-        NotificationManager.Policy policy = new NotificationManager.Policy(
-                NotificationManager.Policy.PRIORITY_CATEGORY_EVENTS
-                        | NotificationManager.Policy.PRIORITY_CATEGORY_REMINDERS
-                        | NotificationManager.Policy.PRIORITY_CATEGORY_ALARMS
-                        | NotificationManager.Policy.PRIORITY_CATEGORY_MEDIA,
-                0, 0);
-        final String result = mBuilder.getBehaviorSettingSummary(policy,
-                Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
-
-        String custom = mContext.getString(R.string.zen_mode_behavior_summary_custom);
-        assertEquals(custom, result);
-    }
-
-    @Test
-    public void testGetBehaviorSettingSummary_totalSilence() {
+    public void testGetBehaviorSettingSummary_noSoundsCanBypass() {
         NotificationManager.Policy policy = new NotificationManager.Policy(0, 0, 0);
         final String result = mBuilder.getBehaviorSettingSummary(policy,
                 Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
 
-        String totalSilence = mContext.getString(R.string.zen_mode_behavior_total_silence);
+        String totalSilence = mContext.getString(R.string.zen_mode_no_exceptions);
         assertEquals(totalSilence, result);
     }
 
@@ -80,7 +65,9 @@ public class ZenModeSettingsTest {
         final String result = mBuilder.getBehaviorSettingSummary(policy,
                 Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
 
-        String alarmsAndMedia = mContext.getString(R.string.zen_mode_behavior_alarms_only);
+        String alarmsAndMedia = mContext.getString(R.string.join_two_items,
+                mContext.getString(R.string.zen_mode_alarms),
+                mContext.getString(R.string.zen_mode_media).toLowerCase());
         assertEquals(alarmsAndMedia, result);
     }