Fix broken tests
Test: robo tests Fixes: 130871450 Change-Id: If7b01147f5680392c7635f3a3b4e558aa56a633e
This commit is contained in:
@@ -209,6 +209,7 @@ public class NotificationPreferenceControllerTest {
|
||||
appRow.lockedChannelId = sameId;
|
||||
NotificationChannel channel = mock(NotificationChannel.class);
|
||||
when(channel.getId()).thenReturn(sameId);
|
||||
when(channel.getImportance()).thenReturn(IMPORTANCE_LOW);
|
||||
|
||||
mController.onResume(appRow, channel, null, null);
|
||||
assertFalse(mController.isChannelBlockable());
|
||||
@@ -223,8 +224,10 @@ public class NotificationPreferenceControllerTest {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.lockedChannelId = "something";
|
||||
appRow.lockedImportance = true;
|
||||
NotificationChannel channel = mock(NotificationChannel.class);
|
||||
when(channel.getImportance()).thenReturn(IMPORTANCE_LOW);
|
||||
|
||||
mController.onResume(appRow, mock(NotificationChannel.class), null, null);
|
||||
mController.onResume(appRow, channel, null, null);
|
||||
assertFalse(mController.isChannelBlockable());
|
||||
|
||||
appRow.lockedImportance = false;
|
||||
|
Reference in New Issue
Block a user