use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by omnirom.
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 omnirom.
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 omnirom.
the class FirmwareVersionPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE)).thenReturn(null);
mController = new FirmwareVersionPreferenceController(mContext, mLifecycle);
when(mPreferenceScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by omnirom.
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 omnirom.
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