Loading tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public final class InterruptionFilterPreferenceControllerTest { @Test public void updateState_dnd_enabled() { TwoStatePreference preference = mock(TwoStatePreference.class); ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE; ZenMode dnd = TestModeBuilder.MANUAL_DND; mController.updateState(preference, dnd); Loading @@ -81,7 +81,11 @@ public final class InterruptionFilterPreferenceControllerTest { @Test public void updateState_specialDnd_disabled() { TwoStatePreference preference = mock(TwoStatePreference.class); ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true); ZenMode specialDnd = new TestModeBuilder() .makeManualDnd() .setInterruptionFilter(INTERRUPTION_FILTER_NONE) .setActive(true) .build(); mController.updateState(preference, specialDnd); Loading tests/robotests/src/com/android/settings/notification/modes/ManualDurationPreferenceControllerTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -70,8 +70,7 @@ public class ManualDurationPreferenceControllerTest { @Test public void testIsAvailable_onlyForManualDnd() { assertThat(mPrefController.isAvailable(TestModeBuilder.EXAMPLE)).isFalse(); assertThat(mPrefController.isAvailable(TestModeBuilder.MANUAL_DND_ACTIVE)).isTrue(); assertThat(mPrefController.isAvailable(TestModeBuilder.MANUAL_DND_INACTIVE)).isTrue(); assertThat(mPrefController.isAvailable(TestModeBuilder.MANUAL_DND)).isTrue(); } @Test Loading tests/robotests/src/com/android/settings/notification/modes/ZenModeAppsLinkPreferenceControllerTest.java +6 −3 Original line number Diff line number Diff line Loading @@ -63,7 +63,6 @@ import com.android.settingslib.notification.modes.TestModeBuilder; import com.android.settingslib.notification.modes.ZenMode; import com.android.settingslib.notification.modes.ZenModesBackend; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.MoreExecutors; import org.junit.Before; Loading Loading @@ -153,14 +152,18 @@ public final class ZenModeAppsLinkPreferenceControllerTest { @Test public void updateState_dnd_enabled() { ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE; ZenMode dnd = TestModeBuilder.MANUAL_DND; mController.updateState(mPreference, dnd); assertThat(mPreference.isEnabled()).isTrue(); } @Test public void updateState_specialDnd_disabled() { ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true); ZenMode specialDnd = new TestModeBuilder() .makeManualDnd() .setInterruptionFilter(INTERRUPTION_FILTER_NONE) .setActive(true) .build(); mController.updateState(mPreference, specialDnd); assertThat(mPreference.isEnabled()).isFalse(); } Loading tests/robotests/src/com/android/settings/notification/modes/ZenModeButtonPreferenceControllerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ public final class ZenModeButtonPreferenceControllerTest { Button button = new Button(mContext); LayoutPreference pref = mock(LayoutPreference.class); when(pref.findViewById(anyInt())).thenReturn(button); ZenMode zenMode = TestModeBuilder.MANUAL_DND_INACTIVE; ZenMode zenMode = TestModeBuilder.MANUAL_DND; mController.updateZenMode(pref, zenMode); button.callOnClick(); Loading @@ -204,7 +204,7 @@ public final class ZenModeButtonPreferenceControllerTest { Button button = new Button(mContext); LayoutPreference pref = mock(LayoutPreference.class); when(pref.findViewById(anyInt())).thenReturn(button); ZenMode zenMode = TestModeBuilder.MANUAL_DND_INACTIVE; ZenMode zenMode = TestModeBuilder.MANUAL_DND; mController.updateZenMode(pref, zenMode); button.callOnClick(); Loading tests/robotests/src/com/android/settings/notification/modes/ZenModeDisplayLinkPreferenceControllerTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public final class ZenModeDisplayLinkPreferenceControllerTest { @Test public void updateState_dnd_enabled() { Preference preference = mock(Preference.class); ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE; ZenMode dnd = TestModeBuilder.MANUAL_DND; mController.updateState(preference, dnd); Loading @@ -78,7 +78,11 @@ public final class ZenModeDisplayLinkPreferenceControllerTest { @Test public void updateState_specialDnd_disabled() { Preference preference = mock(Preference.class); ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true); ZenMode specialDnd = new TestModeBuilder() .makeManualDnd() .setInterruptionFilter(INTERRUPTION_FILTER_NONE) .setActive(true) .build(); mController.updateState(preference, specialDnd); Loading Loading
tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public final class InterruptionFilterPreferenceControllerTest { @Test public void updateState_dnd_enabled() { TwoStatePreference preference = mock(TwoStatePreference.class); ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE; ZenMode dnd = TestModeBuilder.MANUAL_DND; mController.updateState(preference, dnd); Loading @@ -81,7 +81,11 @@ public final class InterruptionFilterPreferenceControllerTest { @Test public void updateState_specialDnd_disabled() { TwoStatePreference preference = mock(TwoStatePreference.class); ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true); ZenMode specialDnd = new TestModeBuilder() .makeManualDnd() .setInterruptionFilter(INTERRUPTION_FILTER_NONE) .setActive(true) .build(); mController.updateState(preference, specialDnd); Loading
tests/robotests/src/com/android/settings/notification/modes/ManualDurationPreferenceControllerTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -70,8 +70,7 @@ public class ManualDurationPreferenceControllerTest { @Test public void testIsAvailable_onlyForManualDnd() { assertThat(mPrefController.isAvailable(TestModeBuilder.EXAMPLE)).isFalse(); assertThat(mPrefController.isAvailable(TestModeBuilder.MANUAL_DND_ACTIVE)).isTrue(); assertThat(mPrefController.isAvailable(TestModeBuilder.MANUAL_DND_INACTIVE)).isTrue(); assertThat(mPrefController.isAvailable(TestModeBuilder.MANUAL_DND)).isTrue(); } @Test Loading
tests/robotests/src/com/android/settings/notification/modes/ZenModeAppsLinkPreferenceControllerTest.java +6 −3 Original line number Diff line number Diff line Loading @@ -63,7 +63,6 @@ import com.android.settingslib.notification.modes.TestModeBuilder; import com.android.settingslib.notification.modes.ZenMode; import com.android.settingslib.notification.modes.ZenModesBackend; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.MoreExecutors; import org.junit.Before; Loading Loading @@ -153,14 +152,18 @@ public final class ZenModeAppsLinkPreferenceControllerTest { @Test public void updateState_dnd_enabled() { ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE; ZenMode dnd = TestModeBuilder.MANUAL_DND; mController.updateState(mPreference, dnd); assertThat(mPreference.isEnabled()).isTrue(); } @Test public void updateState_specialDnd_disabled() { ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true); ZenMode specialDnd = new TestModeBuilder() .makeManualDnd() .setInterruptionFilter(INTERRUPTION_FILTER_NONE) .setActive(true) .build(); mController.updateState(mPreference, specialDnd); assertThat(mPreference.isEnabled()).isFalse(); } Loading
tests/robotests/src/com/android/settings/notification/modes/ZenModeButtonPreferenceControllerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ public final class ZenModeButtonPreferenceControllerTest { Button button = new Button(mContext); LayoutPreference pref = mock(LayoutPreference.class); when(pref.findViewById(anyInt())).thenReturn(button); ZenMode zenMode = TestModeBuilder.MANUAL_DND_INACTIVE; ZenMode zenMode = TestModeBuilder.MANUAL_DND; mController.updateZenMode(pref, zenMode); button.callOnClick(); Loading @@ -204,7 +204,7 @@ public final class ZenModeButtonPreferenceControllerTest { Button button = new Button(mContext); LayoutPreference pref = mock(LayoutPreference.class); when(pref.findViewById(anyInt())).thenReturn(button); ZenMode zenMode = TestModeBuilder.MANUAL_DND_INACTIVE; ZenMode zenMode = TestModeBuilder.MANUAL_DND; mController.updateZenMode(pref, zenMode); button.callOnClick(); Loading
tests/robotests/src/com/android/settings/notification/modes/ZenModeDisplayLinkPreferenceControllerTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public final class ZenModeDisplayLinkPreferenceControllerTest { @Test public void updateState_dnd_enabled() { Preference preference = mock(Preference.class); ZenMode dnd = TestModeBuilder.MANUAL_DND_ACTIVE; ZenMode dnd = TestModeBuilder.MANUAL_DND; mController.updateState(preference, dnd); Loading @@ -78,7 +78,11 @@ public final class ZenModeDisplayLinkPreferenceControllerTest { @Test public void updateState_specialDnd_disabled() { Preference preference = mock(Preference.class); ZenMode specialDnd = TestModeBuilder.manualDnd(INTERRUPTION_FILTER_NONE, true); ZenMode specialDnd = new TestModeBuilder() .makeManualDnd() .setInterruptionFilter(INTERRUPTION_FILTER_NONE) .setActive(true) .build(); mController.updateState(preference, specialDnd); Loading