summaryrefslogtreecommitdiff
path: root/tests/src/com
diff options
context:
space:
mode:
authorMarcus Hagerott <mhagerott@google.com>2016-12-05 16:59:48 -0800
committerMarcus Hagerott <mhagerott@google.com>2016-12-14 11:40:43 -0800
commitf0e140aec2f5832a517243084bea626011be9c39 (patch)
tree950d1dfb4485232dc2bdfa490ce3370a53230f6f /tests/src/com
parenta89f523ed4296f2e46dc25f71e5b9873922abc42 (diff)
downloadContacts-f0e140aec2f5832a517243084bea626011be9c39.tar.gz
Remove some methods from AccountTypeManager
This will make it simpler to do additional refactoring. Test: built GoogleContacts app Bug: 32028702 Change-Id: I51939d1b841eaf250cb75e198ea561b944deff1f
Diffstat (limited to 'tests/src/com')
-rw-r--r--tests/src/com/android/contacts/editor/ContactEditorUtilsTest.java31
-rw-r--r--tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java19
2 files changed, 0 insertions, 50 deletions
diff --git a/tests/src/com/android/contacts/editor/ContactEditorUtilsTest.java b/tests/src/com/android/contacts/editor/ContactEditorUtilsTest.java
index f6c2d1b1c..9756a0c50 100644
--- a/tests/src/com/android/contacts/editor/ContactEditorUtilsTest.java
+++ b/tests/src/com/android/contacts/editor/ContactEditorUtilsTest.java
@@ -79,37 +79,6 @@ public class ContactEditorUtilsTest extends AndroidTestCase {
mAccountTypes.mAccounts = accounts;
}
- public void testGetWritableAccountTypeStrings() {
- String[] types;
-
- // 0 writable types
- setAccountTypes();
-
- types = mTarget.getWritableAccountTypeStrings();
- MoreAsserts.assertEquals(types, new String[0]);
-
- // 1 writable type
- setAccountTypes(TYPE1);
-
- types = mTarget.getWritableAccountTypeStrings();
- MoreAsserts.assertEquals(Sets.newHashSet(TYPE1.accountType), Sets.newHashSet(types));
-
- // 2 writable types
- setAccountTypes(TYPE1, TYPE2EX);
-
- types = mTarget.getWritableAccountTypeStrings();
- MoreAsserts.assertEquals(Sets.newHashSet(TYPE1.accountType, TYPE2EX.accountType),
- Sets.newHashSet(types));
-
- // 3 writable types + 1 readonly type
- setAccountTypes(TYPE1, TYPE2, TYPE2EX, TYPE3);
-
- types = mTarget.getWritableAccountTypeStrings();
- MoreAsserts.assertEquals(
- Sets.newHashSet(TYPE1.accountType, TYPE2.accountType, TYPE2EX.accountType),
- Sets.newHashSet(types));
- }
-
/**
* Test for
* - {@link ContactEditorUtils#saveDefaultAccount}
diff --git a/tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java b/tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java
index 00686aa15..16804c93d 100644
--- a/tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java
+++ b/tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java
@@ -76,12 +76,6 @@ public class MockAccountTypeManager extends AccountTypeManager {
}
@Override
- public List<AccountWithDataSet> getSortedAccounts(AccountWithDataSet account,
- boolean writableOnly) {
- return Arrays.asList(mAccounts);
- }
-
- @Override
public List<AccountWithDataSet> getGroupWritableAccounts() {
return Arrays.asList(mAccounts);
}
@@ -95,17 +89,4 @@ public class MockAccountTypeManager extends AccountTypeManager {
public Map<AccountTypeWithDataSet, AccountType> getUsableInvitableAccountTypes() {
return Maps.newHashMap(); // Always returns empty
}
-
- @Override
- public List<AccountType> getAccountTypes(boolean writableOnly) {
- final List<AccountType> ret = Lists.newArrayList();
- synchronized (this) {
- for (AccountType type : mTypes) {
- if (!writableOnly || type.areContactsWritable()) {
- ret.add(type);
- }
- }
- }
- return ret;
- }
}