}
@Test
+ public void testIconColorShouldBeUpdatedWhenSettingDark() throws Exception {
+ ExpandableNotificationRow row = spy(mNotificationTestHelper.createRow());
+ row.setDark(true, false, 0);
+ verify(row).updateShelfIconColor();
+ }
++
++ @Test
+ public void testAboveShelfChangedListenerCalled() throws Exception {
+ ExpandableNotificationRow row = mNotificationTestHelper.createRow();
+ AboveShelfChangedListener listener = mock(AboveShelfChangedListener.class);
+ row.setAboveShelfChangedListener(listener);
+ row.setHeadsUp(true);
+ verify(listener).onAboveShelfStateChanged(true);
+ }
+
+ @Test
+ public void testAboveShelfChangedListenerCalledPinned() throws Exception {
+ ExpandableNotificationRow row = mNotificationTestHelper.createRow();
+ AboveShelfChangedListener listener = mock(AboveShelfChangedListener.class);
+ row.setAboveShelfChangedListener(listener);
+ row.setPinned(true);
+ verify(listener).onAboveShelfStateChanged(true);
+ }
+
+ @Test
+ public void testAboveShelfChangedListenerCalledHeadsUpGoingAway() throws Exception {
+ ExpandableNotificationRow row = mNotificationTestHelper.createRow();
+ AboveShelfChangedListener listener = mock(AboveShelfChangedListener.class);
+ row.setAboveShelfChangedListener(listener);
+ row.setHeadsUpAnimatingAway(true);
+ verify(listener).onAboveShelfStateChanged(true);
+ }
+ @Test
+ public void testAboveShelfChangedListenerCalledWhenGoingBelow() throws Exception {
+ ExpandableNotificationRow row = mNotificationTestHelper.createRow();
+ row.setHeadsUp(true);
+ AboveShelfChangedListener listener = mock(AboveShelfChangedListener.class);
+ row.setAboveShelfChangedListener(listener);
+ row.setAboveShelf(false);
+ verify(listener).onAboveShelfStateChanged(false);
+ }
}