Merge "Use Activity Context in RemoveAccountPreferenceControllerTest."

This commit is contained in:
TreeHugger Robot
2019-06-14 19:01:39 +00:00
committed by Android (Google) Code Review

View File

@@ -65,6 +65,7 @@ import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
@@ -114,8 +115,8 @@ public class RemoveAccountPreferenceControllerTest {
when(mAccountManager.getAuthenticatorTypesAsUser(anyInt()))
.thenReturn(new AuthenticatorDescription[0]);
when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]);
mController = new RemoveAccountPreferenceController(RuntimeEnvironment.application,
mFragment);
mController = new RemoveAccountPreferenceController(
Robolectric.setupActivity(Activity.class), mFragment);
}
@After