use of com.android.settings.dashboard.DashboardFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class HeaderPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
ShadowApplication shadowApplication = ShadowApplication.getInstance();
shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNm);
shadowApplication.setSystemService(Context.USER_SERVICE, mUm);
mContext = RuntimeEnvironment.application;
DashboardFragment fragment = mock(DashboardFragment.class);
when(fragment.getContext()).thenReturn(mContext);
FragmentActivity activity = mock(FragmentActivity.class);
when(activity.getApplicationContext()).thenReturn(mContext);
when(fragment.getActivity()).thenReturn(activity);
mController = spy(new HeaderPreferenceController(mContext, fragment));
when(mPreference.findViewById(anyInt())).thenReturn(mView);
}
use of com.android.settings.dashboard.DashboardFragment in project android_packages_apps_Settings by omnirom.
the class ConversationHeaderPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
ShadowApplication shadowApplication = ShadowApplication.getInstance();
shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNm);
shadowApplication.setSystemService(Context.USER_SERVICE, mUm);
mContext = RuntimeEnvironment.application;
DashboardFragment fragment = mock(DashboardFragment.class);
when(fragment.getContext()).thenReturn(mContext);
FragmentActivity activity = mock(FragmentActivity.class);
when(activity.getApplicationContext()).thenReturn(mContext);
when(fragment.getActivity()).thenReturn(activity);
mController = spy(new ConversationHeaderPreferenceController(mContext, fragment));
when(mPreference.findViewById(anyInt())).thenReturn(mView);
}
use of com.android.settings.dashboard.DashboardFragment in project android_packages_apps_Settings by omnirom.
the class HeaderPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
ShadowApplication shadowApplication = ShadowApplication.getInstance();
shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNm);
shadowApplication.setSystemService(Context.USER_SERVICE, mUm);
mContext = RuntimeEnvironment.application;
DashboardFragment fragment = mock(DashboardFragment.class);
when(fragment.getContext()).thenReturn(mContext);
FragmentActivity activity = mock(FragmentActivity.class);
when(activity.getApplicationContext()).thenReturn(mContext);
when(fragment.getActivity()).thenReturn(activity);
mController = spy(new HeaderPreferenceController(mContext, fragment));
when(mPreference.findViewById(anyInt())).thenReturn(mView);
}
Aggregations