use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by SudaMod.
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 SudaMod.
the class DevelopmentSwitchBarControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
mSwitchBar = new SwitchBar(RuntimeEnvironment.application);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by SudaMod.
the class BuildNumberPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mFactory = FakeFeatureFactory.setupForTest(mContext);
mLifecycle = new Lifecycle();
when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
mController = new BuildNumberPreferenceController(mContext, mActivity, mFragment, mLifecycle);
mPreference = new Preference(RuntimeEnvironment.application);
mPreference.setKey(mController.getPreferenceKey());
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by SudaMod.
the class WifiDetailActionBarObserverTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
when(mockFragment.getActivity()).thenReturn(mockActivity);
when(mockActivity.getActionBar()).thenReturn(mockActionBar);
mObserver = new WifiDetailActionBarObserver(mContext, mockFragment);
mLifecycle.addObserver(mObserver);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by SudaMod.
the class WifiP2PPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
when(mContext.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
when(mScreen.findPreference(anyString())).thenReturn(mWifiDirectPreference);
mController = new WifiP2pPreferenceController(mContext, mLifecycle, mWifiManager);
}
Aggregations