Move away from deprecated FakeFeatureFactory.setupForTest()

Test: rerun
Change-Id: I896ba414315ddb1664c0499264f4992f0554ef98
This commit is contained in:
Fan Zhang
2017-12-04 15:24:45 -08:00
parent caf5358e40
commit dff6dd687e
101 changed files with 330 additions and 538 deletions

View File

@@ -67,7 +67,7 @@ public class DefaultAppPickerFragmentTest {
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mFeatureFactory = FakeFeatureFactory.setupForTest(mActivity);
mFeatureFactory = FakeFeatureFactory.setupForTest();
mFragment = spy(new TestFragment());
when(mActivity.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);

View File

@@ -17,7 +17,6 @@
package com.android.settings.applications.defaultapps;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
@@ -59,7 +58,7 @@ public class DefaultAutofillPickerTest {
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
FakeFeatureFactory.setupForTest(mActivity);
FakeFeatureFactory.setupForTest();
when(mActivity.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
mPicker = spy(new DefaultAutofillPicker());
mPicker.onAttach((Context) mActivity);