use of com.android.settings.slices.SettingsSliceProvider in project android_packages_apps_Settings by omnirom.
the class Enhanced4gLteSliceHelperTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = spy(ApplicationProvider.getApplicationContext());
mFeatureFactory = FakeFeatureFactory.setupForTest();
mSlicesFeatureProvider = mFeatureFactory.getSlicesFeatureProvider();
// setup for SettingsSliceProvider tests
mProvider = new SettingsSliceProvider();
mProvider.attachInfo(mContext, null);
mProvider.onCreateSliceProvider();
// setup for SliceBroadcastReceiver test
mReceiver = spy(new SliceBroadcastReceiver());
mQueryImsState = spy(new MockVolteQueryImsState(mContext, SUB_ID));
mQueryImsState.setEnabledByPlatform(true);
mQueryImsState.setIsProvisionedOnDevice(true);
mQueryImsState.setIsTtyOnVolteEnabled(true);
mQueryImsState.setServiceStateReady(true);
mQueryImsState.setIsEnabledByUser(true);
mEnhanced4gLteSliceHelper = spy(new FakeEnhanced4gLteSliceHelper(mContext));
// Set-up specs for SliceMetadata.
SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
}
use of com.android.settings.slices.SettingsSliceProvider in project android_packages_apps_Settings by omnirom.
the class WifiCallingSliceHelperTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
// setup for SettingsSliceProvider tests
mProvider = spy(new SettingsSliceProvider());
doReturn(mContext).when(mProvider).getContext();
mProvider.onCreateSliceProvider();
// setup for SliceBroadcastReceiver test
mReceiver = spy(new SliceBroadcastReceiver());
mFeatureFactory = FakeFeatureFactory.setupForTest();
mSlicesFeatureProvider = mFeatureFactory.getSlicesFeatureProvider();
mQueryImsState = new MockWifiCallingQueryImsState(mContext, SUB_ID);
mQueryImsState.setIsEnabledByUser(true);
mQueryImsState.setIsEnabledByPlatform(true);
mQueryImsState.setIsProvisionedOnDevice(true);
mWfcSliceHelper = spy(new FakeWifiCallingSliceHelper(mContext));
doReturn(mQueryImsState).when(mWfcSliceHelper).queryImsState(anyInt());
// Set-up specs for SliceMetadata.
SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
}
Aggregations