use of com.android.settings.core.InstrumentedFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SearchMenuControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
mHost = new InstrumentedFragment() {
@Override
public Context getContext() {
return mContext;
}
@Override
public int getMetricsCategory() {
return SettingsEnums.TESTING;
}
};
mPreferenceHost = new TestPreferenceFragment();
Global.putInt(mContext.getContentResolver(), Global.DEVICE_PROVISIONED, 1);
when(mMenu.add(Menu.NONE, Menu.NONE, 0, /* order */
R.string.search_menu)).thenReturn(mock(MenuItem.class));
}
Aggregations