diff options
author | Walter Jang <wjang@google.com> | 2015-07-10 12:19:24 -0700 |
---|---|---|
committer | Walter Jang <wjang@google.com> | 2015-07-10 12:29:22 -0700 |
commit | 1933d442ccda2b1561c47085bb205d29dcaf418a (patch) | |
tree | 7303a811bed0f19143793fb4660bb88bc0fdc71c /tests/src/com/android/contacts | |
parent | 6aa0ab91746534fe5b30a1456687485d1b38b85a (diff) | |
download | android_packages_apps_ContactsCommon-1933d442ccda2b1561c47085bb205d29dcaf418a.tar.gz android_packages_apps_ContactsCommon-1933d442ccda2b1561c47085bb205d29dcaf418a.tar.bz2 android_packages_apps_ContactsCommon-1933d442ccda2b1561c47085bb205d29dcaf418a.zip |
Fix broken contacts common unit tests
* Brian informs me that he (or Makoto) changed the
external account type constructor to not abort
if it doesn't parse the xml so I updated the test
for unknown packages to expect to get initialized.
* Looks like an omission that SIP address does not
have a maxOccurs set to 1 when initilized. I tried
to change the test data file contacts_fallback.xml
to not include a maxOccurs attr but it needs one
and it must be set to 1.
Bug 15413731
Change-Id: I4a8a297799686885eaa64868a2b8c0f25c177f4b
Diffstat (limited to 'tests/src/com/android/contacts')
-rw-r--r-- | tests/src/com/android/contacts/common/model/account/ExternalAccountTypeTest.java | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/src/com/android/contacts/common/model/account/ExternalAccountTypeTest.java b/tests/src/com/android/contacts/common/model/account/ExternalAccountTypeTest.java index 7e799f2f..d508e0fc 100644 --- a/tests/src/com/android/contacts/common/model/account/ExternalAccountTypeTest.java +++ b/tests/src/com/android/contacts/common/model/account/ExternalAccountTypeTest.java @@ -69,27 +69,13 @@ public class ExternalAccountTypeTest extends AndroidTestCase { } /** - * Initialize with an invalid package name and see if type type will *not* be initialized. + * Initialize with an invalid package name and see if type will be initialized, but empty. */ public void testNoPackage() { final ExternalAccountType type = new ExternalAccountType(getContext(), "!!!no such package name!!!", false); - assertFalse(type.isInitialized()); - } - - /** - * Initialize with the name of an existing package, which has no contacts.xml metadata. - */ - /* - public void testNoMetadata() { - // Use the main application package, which does exist, but has no contacts.xml in it. - String packageName = getContext().getPackageName(); - Log.e("TEST", packageName); - final ExternalAccountType type = new ExternalAccountType(getContext(), - packageName, false); assertTrue(type.isInitialized()); } - */ /** * Initialize with the test package itself and see if EditSchema is correctly parsed. |