summaryrefslogtreecommitdiff
path: root/tests/src/com/android/contacts/model
diff options
context:
space:
mode:
authorJohn Shao <johnshao@google.com>2020-01-17 16:36:07 -0800
committerJohn Shao <johnshao@google.com>2020-01-17 16:37:22 -0800
commite34c4ebd1f1868c6b721329e081129076f9859a8 (patch)
tree3c0ce0faf6e72c6f9ef14392b956dcb67e32b710 /tests/src/com/android/contacts/model
parent83d098995edc8045c235d08678e4c45f2b850faf (diff)
downloadContacts-e34c4ebd1f1868c6b721329e081129076f9859a8.tar.gz
Fix unit tests in AOSP Contacts
Fixes: 142947789 Change-Id: I7b36f8066819d59db6a2291160b1713284c14d12 Test: atest ContactsTests
Diffstat (limited to 'tests/src/com/android/contacts/model')
-rw-r--r--tests/src/com/android/contacts/model/AccountTypeManagerTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/src/com/android/contacts/model/AccountTypeManagerTest.java b/tests/src/com/android/contacts/model/AccountTypeManagerTest.java
index 982517b1b..dfcb3909f 100644
--- a/tests/src/com/android/contacts/model/AccountTypeManagerTest.java
+++ b/tests/src/com/android/contacts/model/AccountTypeManagerTest.java
@@ -96,7 +96,7 @@ public class AccountTypeManagerTest extends AndroidTestCase {
}
public void testGetDefaultAccount_NoAccounts_DefaultPreferenceSet() {
- when(mPrefs.getString(Mockito.anyString(), Mockito.anyString())).thenReturn(
+ when(mPrefs.getString(Mockito.anyString(), Mockito.any())).thenReturn(
getDefaultAccountPreference("name1", GoogleAccountType.ACCOUNT_TYPE));
assertNull(getDefaultGoogleAccountName());
}
@@ -108,21 +108,21 @@ public class AccountTypeManagerTest extends AndroidTestCase {
public void testGetDefaultAccount_DefaultAccountPreferenceSet() {
when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS);
- when(mPrefs.getString(Mockito.anyString(), Mockito.anyString())).thenReturn(
+ when(mPrefs.getString(Mockito.anyString(), Mockito.any())).thenReturn(
getDefaultAccountPreference("name2", GoogleAccountType.ACCOUNT_TYPE));
assertEquals("name2", getDefaultGoogleAccountName());
}
public void testGetDefaultAccount_DefaultAccountPreferenceSet_NonGoogleAccountType() {
when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS);
- when(mPrefs.getString(Mockito.anyString(), Mockito.anyString())).thenReturn(
+ when(mPrefs.getString(Mockito.anyString(), Mockito.any())).thenReturn(
getDefaultAccountPreference("name3", "type3"));
assertEquals("name1", getDefaultGoogleAccountName());
}
public void testGetDefaultAccount_DefaultAccountPreferenceSet_UnknownName() {
when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS);
- when(mPrefs.getString(Mockito.anyString(), Mockito.anyString())).thenReturn(
+ when(mPrefs.getString(Mockito.anyString(), Mockito.any())).thenReturn(
getDefaultAccountPreference("name4",GoogleAccountType.ACCOUNT_TYPE));
assertEquals("name1", getDefaultGoogleAccountName());
}