use of androidx.slice.Slice in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class DeviceInfoSliceTest method getSlice_hasNoSubscriptionInfo_shouldShowUnknown.
@Test
public void getSlice_hasNoSubscriptionInfo_shouldShowUnknown() {
final Slice slice = mDeviceInfoSlice.getSlice();
final SliceMetadata metadata = SliceMetadata.from(mContext, slice);
assertThat(metadata.getTitle()).isEqualTo(mContext.getString(R.string.device_info_label));
final List<SliceItem> sliceItems = slice.getItems();
SliceTester.assertAnySliceItemContainsTitle(sliceItems, mContext.getString(R.string.device_info_default));
}
use of androidx.slice.Slice in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BluetoothDevicesSliceTest method getSlice_hasBluetoothDevices_shouldHaveBluetoothDevicesTitle.
@Test
public void getSlice_hasBluetoothDevices_shouldHaveBluetoothDevicesTitle() {
mockBluetoothDeviceList(1);
doReturn(mBluetoothDeviceList).when(mBluetoothDevicesSlice).getConnectedBluetoothDevices();
final Slice slice = mBluetoothDevicesSlice.getSlice();
final SliceMetadata metadata = SliceMetadata.from(mContext, slice);
assertThat(metadata.getTitle()).isEqualTo(mContext.getString(R.string.bluetooth_devices));
}
use of androidx.slice.Slice in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BluetoothDevicesSliceTest method getSlice_noBluetoothDevices_shouldHaveNoBluetoothDevicesTitle.
@Test
public void getSlice_noBluetoothDevices_shouldHaveNoBluetoothDevicesTitle() {
doReturn(mBluetoothDeviceList).when(mBluetoothDevicesSlice).getConnectedBluetoothDevices();
final Slice slice = mBluetoothDevicesSlice.getSlice();
final SliceMetadata metadata = SliceMetadata.from(mContext, slice);
assertThat(metadata.getTitle()).isEqualTo(mContext.getString(R.string.no_bluetooth_devices));
}
use of androidx.slice.Slice in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ContextualAdaptiveSleepSliceTest method getSlice_ShowIfFeatureIsAvailable.
@Test
public void getSlice_ShowIfFeatureIsAvailable() {
final Slice slice = mContextualAdaptiveSleepSlice.getSlice();
assertThat(slice).isNotNull();
}
use of androidx.slice.Slice in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ContextualAdaptiveSleepSliceTest method getSlice_ShowIfNotTurnedOn.
@Test
public void getSlice_ShowIfNotTurnedOn() {
final Slice slice = mContextualAdaptiveSleepSlice.getSlice();
assertThat(slice).isNotNull();
}
Aggregations