use of com.android.settingslib.core.lifecycle.Lifecycle in project platform_packages_apps_Settings by BlissRoms.
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 platform_packages_apps_Settings by BlissRoms.
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();
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project platform_packages_apps_Settings by BlissRoms.
the class AssistContextPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
when(mScreen.findPreference(anyString())).thenReturn(mPreference);
mLifecycle = new Lifecycle();
mContext = RuntimeEnvironment.application;
mController = new AssistContextPreferenceController(mContext, mLifecycle);
ReflectionHelpers.setField(mController, "mSettingObserver", mObserver);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project platform_packages_apps_Settings by BlissRoms.
the class AssistFlashScreenPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
when(mScreen.findPreference(anyString())).thenReturn(mPreference);
mLifecycle = new Lifecycle();
mContext = RuntimeEnvironment.application;
mController = spy(new AssistFlashScreenPreferenceController(mContext, mLifecycle));
mLifecycle.addObserver(mController);
ReflectionHelpers.setField(mController, "mSettingObserver", mObserver);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project platform_packages_apps_Settings by BlissRoms.
the class BluetoothDetailsControllerTestBase method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mPreferenceManager = new PreferenceManager(mContext);
mScreen = mPreferenceManager.createPreferenceScreen(mContext);
mDeviceConfig = makeDefaultDeviceConfig();
when(mFragment.getActivity()).thenReturn(mActivity);
when(mActivity.getApplicationContext()).thenReturn(mContext);
when(mFragment.getContext()).thenReturn(mContext);
when(mFragment.getPreferenceManager()).thenReturn(mPreferenceManager);
when(mFragment.getPreferenceScreen()).thenReturn(mScreen);
mLifecycle = spy(new Lifecycle());
mBluetoothManager = new BluetoothManager(mContext);
mBluetoothAdapter = mBluetoothManager.getAdapter();
}
Aggregations