diff options
author | Dmitri Plotnikov <dplotnikov@google.com> | 2010-09-21 18:34:25 -0700 |
---|---|---|
committer | Dmitri Plotnikov <dplotnikov@google.com> | 2010-09-21 18:34:25 -0700 |
commit | 385182830ff0ed84edce9aba2424d2afe99453ce (patch) | |
tree | fb994436acd07bafe22e85a8122b831e0e4136d3 /tests | |
parent | d015a8321fb9dcbfa96becb909145dfcce3da608 (diff) | |
download | packages_providers_ContactsProvider-385182830ff0ed84edce9aba2424d2afe99453ce.zip packages_providers_ContactsProvider-385182830ff0ed84edce9aba2424d2afe99453ce.tar.gz packages_providers_ContactsProvider-385182830ff0ed84edce9aba2424d2afe99453ce.tar.bz2 |
Adding a table for Directories.DEFAULT contents
Change-Id: I9d1c15e6df24fbec84e436923abdae75b88c6eac
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/providers/contacts/DirectoryTest.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/src/com/android/providers/contacts/DirectoryTest.java b/tests/src/com/android/providers/contacts/DirectoryTest.java index adb3b34..5fcc1ae 100644 --- a/tests/src/com/android/providers/contacts/DirectoryTest.java +++ b/tests/src/com/android/providers/contacts/DirectoryTest.java @@ -72,7 +72,7 @@ public class DirectoryTest extends BaseContactsProvider2Test { } public void testForwardingToLocalContacts() { - long contactId = queryContactId(createRawContactWithName()); + long contactId = queryContactId(createRawContactWithName("John", "Doe")); Uri contentUri = Contacts.CONTENT_URI.buildUpon().appendQueryParameter( ContactsContract.DIRECTORY_PARAM_KEY, String.valueOf(Directory.DEFAULT)).build(); @@ -88,16 +88,16 @@ public class DirectoryTest extends BaseContactsProvider2Test { } public void testForwardingToLocalInvisibleContacts() { - long visibleContactId = queryContactId(createRawContactWithName("Bob", "Parr")); - assertStoredValue(ContentUris.withAppendedId(Contacts.CONTENT_URI, visibleContactId), - Contacts.IN_VISIBLE_GROUP, "1"); + // Visible because there is no account + long visibleContactId = queryContactId(createRawContactWithName("Bob", "Parr")); + Account account = new Account("accountName", "accountType"); + long groupId = createGroup(account, "sid", "def", + 0 /* visible */, true /* auto-add */, false /* fav */); + // Hidden because not member of default group long hiddenContactId = queryContactId(createRawContactWithName("Helen", "Parr", - new Account("accountName", "accountType"))); - - assertStoredValue(ContentUris.withAppendedId(Contacts.CONTENT_URI, hiddenContactId), - Contacts.IN_VISIBLE_GROUP, "0"); + account)); Uri contentUri = Contacts.CONTENT_URI.buildUpon().appendQueryParameter( ContactsContract.DIRECTORY_PARAM_KEY, String.valueOf(Directory.LOCAL_INVISIBLE)) |