diff options
author | Marcus Hagerott <mhagerott@google.com> | 2016-12-05 16:59:48 -0800 |
---|---|---|
committer | Marcus Hagerott <mhagerott@google.com> | 2016-12-14 11:40:43 -0800 |
commit | f0e140aec2f5832a517243084bea626011be9c39 (patch) | |
tree | 950d1dfb4485232dc2bdfa490ce3370a53230f6f /tests/src/com | |
parent | a89f523ed4296f2e46dc25f71e5b9873922abc42 (diff) | |
download | Contacts-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.java | 31 | ||||
-rw-r--r-- | tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java | 19 |
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; - } } |