Search in sources :

Example 1 with InstrumentedFragment

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));
}
Also used : Context(android.content.Context) InstrumentedFragment(com.android.settings.core.InstrumentedFragment) MenuItem(android.view.MenuItem) Before(org.junit.Before)

Aggregations

Context (android.content.Context)1 MenuItem (android.view.MenuItem)1 InstrumentedFragment (com.android.settings.core.InstrumentedFragment)1 Before (org.junit.Before)1