use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by crdroidandroid.
the class AutoRotatePreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
FakeFeatureFactory.setupForTest(mContext);
mContentResolver = RuntimeEnvironment.application.getContentResolver();
mLifecycle = new Lifecycle();
mPreference = new SwitchPreference(RuntimeEnvironment.application);
when(mContext.getPackageManager()).thenReturn(mPackageManager);
when(mContext.getContentResolver()).thenReturn(mContentResolver);
mController = new AutoRotatePreferenceController(mContext, mLifecycle);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by crdroidandroid.
the class WpsPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
when(mContext.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
when(mScreen.findPreference(anyString())).thenReturn(mWpsPushPref).thenReturn(mWpsPinPref);
mController = new WpsPreferenceController(mContext, mLifecycle, mWifiManager, mFragmentManager);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by crdroidandroid.
the class WifiTetherPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
FakeFeatureFactory.setupForTest(mFeatureFactoryContext);
mPreference = new MasterSwitchPreference(RuntimeEnvironment.application);
when(mContext.getSystemService(Context.CONNECTIVITY_SERVICE)).thenReturn(mConnectivityManager);
when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
when(mScreen.findPreference(anyString())).thenReturn(mPreference);
when(mConnectivityManager.getTetherableWifiRegexs()).thenReturn(new String[] { "1", "2" });
mController = new WifiTetherPreferenceController(mContext, mLifecycle);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by crdroidandroid.
the class WifiInfoPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
when(mContext.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
when(mScreen.findPreference(anyString())).thenReturn(mMacPreference).thenReturn(mIpPreference);
mController = new WifiInfoPreferenceController(mContext, mLifecycle, mWifiManager);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by SudaMod.
the class ActionBarShadowControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
when(mActivity.getActionBar()).thenReturn(mActionBar);
mView = new View(RuntimeEnvironment.application);
mLifecycle = new Lifecycle();
}
Aggregations