Search in sources :

Example 1 with FakeSettingsProvider

use of com.android.internal.util.test.FakeSettingsProvider in project platform_frameworks_base by android.

the class IpManagerTest method setUp.

@Before
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    when(mContext.getResources()).thenReturn(mResources);
    when(mResources.getInteger(R.integer.config_networkAvoidBadWifi)).thenReturn(DEFAULT_AVOIDBADWIFI_CONFIG_VALUE);
    mContentResolver = new MockContentResolver();
    mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider());
    when(mContext.getContentResolver()).thenReturn(mContentResolver);
}
Also used : FakeSettingsProvider(com.android.internal.util.test.FakeSettingsProvider) MockContentResolver(android.test.mock.MockContentResolver) Before(org.junit.Before)

Aggregations

MockContentResolver (android.test.mock.MockContentResolver)1 FakeSettingsProvider (com.android.internal.util.test.FakeSettingsProvider)1 Before (org.junit.Before)1