Merge "Fix mocked HighPriorityProvider calls in test" into rvc-dev am: c4c9c0d554
Change-Id: I2a3aa080070701d1508d71fb0ec3111a722b99db
This commit is contained in:
@@ -176,6 +176,7 @@ public class KeyguardCoordinatorTest extends SysuiTestCase {
|
|||||||
.setKey(mEntry.getKey())
|
.setKey(mEntry.getKey())
|
||||||
.setImportance(IMPORTANCE_MIN)
|
.setImportance(IMPORTANCE_MIN)
|
||||||
.build());
|
.build());
|
||||||
|
when(mHighPriorityProvider.isHighPriority(mEntry)).thenReturn(false);
|
||||||
|
|
||||||
// THEN filter out the entry
|
// THEN filter out the entry
|
||||||
assertTrue(mKeyguardFilter.shouldFilterOut(mEntry, 0));
|
assertTrue(mKeyguardFilter.shouldFilterOut(mEntry, 0));
|
||||||
@@ -197,7 +198,8 @@ public class KeyguardCoordinatorTest extends SysuiTestCase {
|
|||||||
.setImportance(IMPORTANCE_MIN)
|
.setImportance(IMPORTANCE_MIN)
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
// WHEN its parent has a summary that exceeds threshold to show on lockscreen
|
// WHEN its parent does exceed threshold tot show on the lockscreen
|
||||||
|
when(mHighPriorityProvider.isHighPriority(parent)).thenReturn(true);
|
||||||
parent.setSummary(new NotificationEntryBuilder()
|
parent.setSummary(new NotificationEntryBuilder()
|
||||||
.setImportance(IMPORTANCE_HIGH)
|
.setImportance(IMPORTANCE_HIGH)
|
||||||
.build());
|
.build());
|
||||||
@@ -205,7 +207,8 @@ public class KeyguardCoordinatorTest extends SysuiTestCase {
|
|||||||
// THEN don't filter out the entry
|
// THEN don't filter out the entry
|
||||||
assertFalse(mKeyguardFilter.shouldFilterOut(entryWithParent, 0));
|
assertFalse(mKeyguardFilter.shouldFilterOut(entryWithParent, 0));
|
||||||
|
|
||||||
// WHEN its parent has a summary that doesn't exceed threshold to show on lockscreen
|
// WHEN its parent doesn't exceed threshold to show on lockscreen
|
||||||
|
when(mHighPriorityProvider.isHighPriority(parent)).thenReturn(false);
|
||||||
parent.setSummary(new NotificationEntryBuilder()
|
parent.setSummary(new NotificationEntryBuilder()
|
||||||
.setImportance(IMPORTANCE_MIN)
|
.setImportance(IMPORTANCE_MIN)
|
||||||
.build());
|
.build());
|
||||||
@@ -248,5 +251,8 @@ public class KeyguardCoordinatorTest extends SysuiTestCase {
|
|||||||
.thenReturn(true);
|
.thenReturn(true);
|
||||||
|
|
||||||
// notification doesn't have a summary
|
// notification doesn't have a summary
|
||||||
|
|
||||||
|
// notification is high priority, so it shouldn't be filtered
|
||||||
|
when(mHighPriorityProvider.isHighPriority(mEntry)).thenReturn(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user