use of com.android.settings.notification.ConfigureNotificationSettings.SummaryProvider in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ConfigureNotificationSettingsTest method getSummary_someBlocked.
@Test
public void getSummary_someBlocked() {
SummaryLoader loader = mock(SummaryLoader.class);
NotificationBackend backend = mock(NotificationBackend.class);
when(backend.getBlockedAppCount()).thenReturn(5);
SummaryProvider provider = (SummaryProvider) SUMMARY_PROVIDER_FACTORY.createSummaryProvider(mActivity, loader);
provider.setBackend(backend);
provider.setListening(true);
ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
verify(loader).setSummary(any(), captor.capture());
assertThat(captor.getValue().toString()).contains("Off");
assertThat(captor.getValue().toString()).contains("5");
}
use of com.android.settings.notification.ConfigureNotificationSettings.SummaryProvider in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ConfigureNotificationSettingsTest method getSummary_noneBlocked.
@Test
public void getSummary_noneBlocked() {
SummaryLoader loader = mock(SummaryLoader.class);
NotificationBackend backend = mock(NotificationBackend.class);
when(backend.getBlockedAppCount()).thenReturn(0);
SummaryProvider provider = (SummaryProvider) SUMMARY_PROVIDER_FACTORY.createSummaryProvider(mActivity, loader);
provider.setBackend(backend);
provider.setListening(true);
ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
verify(loader).setSummary(any(), captor.capture());
assertThat(captor.getValue().toString()).contains("On");
}
Aggregations