Switch from shortlabel to label
Test: atest Bug: 157140669 Change-Id: Iebcb2f076fef33b6f3ce16326af4e4c5c6770459
This commit is contained in:
@@ -103,10 +103,10 @@ public class ConversationHeaderPreferenceControllerTest {
|
||||
@Test
|
||||
public void testGetLabel() {
|
||||
ShortcutInfo si = mock(ShortcutInfo.class);
|
||||
when(si.getShortLabel()).thenReturn("hello");
|
||||
when(si.getLabel()).thenReturn("hello");
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
mController.onResume(appRow, null, null, null, si, null);
|
||||
assertEquals(si.getShortLabel(), mController.getLabel());
|
||||
assertEquals(si.getLabel(), mController.getLabel());
|
||||
|
||||
NotificationChannel channel = new NotificationChannel("cid", "cname", IMPORTANCE_NONE);
|
||||
mController.onResume(appRow, channel, null, null, null, null);
|
||||
|
@@ -169,12 +169,12 @@ public class ConversationListPreferenceControllerTest {
|
||||
ccw.setPkg("pkg");
|
||||
ccw.setUid(1);
|
||||
ShortcutInfo si = mock(ShortcutInfo.class);
|
||||
when(si.getShortLabel()).thenReturn("conversation name");
|
||||
when(si.getLabel()).thenReturn("conversation name");
|
||||
ccw.setShortcutInfo(si);
|
||||
ccw.setGroupLabel("group");
|
||||
ccw.setParentChannelLabel("parent");
|
||||
|
||||
assertThat(mController.getTitle(ccw).toString()).isEqualTo(si.getShortLabel());
|
||||
assertThat(mController.getTitle(ccw).toString()).isEqualTo(si.getLabel());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user