diff options
Diffstat (limited to 'tests/src/com/android/providers/contacts/EnterpriseContactsCursorWrapperTest.java')
-rw-r--r-- | tests/src/com/android/providers/contacts/EnterpriseContactsCursorWrapperTest.java | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/src/com/android/providers/contacts/EnterpriseContactsCursorWrapperTest.java b/tests/src/com/android/providers/contacts/EnterpriseContactsCursorWrapperTest.java index 1f72e223..66cebfc9 100644 --- a/tests/src/com/android/providers/contacts/EnterpriseContactsCursorWrapperTest.java +++ b/tests/src/com/android/providers/contacts/EnterpriseContactsCursorWrapperTest.java @@ -153,8 +153,31 @@ public class EnterpriseContactsCursorWrapperTest extends AndroidTestCase { null, // PhoneLookup.NORMALIZED_NUMBER }); + c.addRow(new Object[] { + 13L, // PhoneLookup._ID, + 13L, // PhoneLookup.CONTACT_ID, + null, // PhoneLookup.LOOKUP_KEY, + null, // PhoneLookup.DISPLAY_NAME, + null, // PhoneLookup.LAST_TIME_CONTACTED, + null, // PhoneLookup.TIMES_CONTACTED, + null, // PhoneLookup.STARRED, + null, // PhoneLookup.IN_DEFAULT_DIRECTORY, + null, // PhoneLookup.IN_VISIBLE_GROUP, + 123L, // PhoneLookup.PHOTO_FILE_ID, + null, // PhoneLookup.PHOTO_ID, + "content://com.android.contacts/display_photo/123", // PhoneLookup.PHOTO_URI, + "content://com.android.contacts/contacts/13/photo", // PhoneLookup.PHOTO_THUMBNAIL_URI, + null, // PhoneLookup.CUSTOM_RINGTONE, + null, // PhoneLookup.HAS_PHONE_NUMBER, + null, // PhoneLookup.SEND_TO_VOICEMAIL, + null, // PhoneLookup.NUMBER, + null, // PhoneLookup.TYPE, + null, // PhoneLookup.LABEL, + null, // PhoneLookup.NORMALIZED_NUMBER + }); + rewritten = new EnterpriseContactsCursorWrapper(c, projection, new int[] {0, 1}, null); - assertEquals(4, rewritten.getCount()); + assertEquals(5, rewritten.getCount()); assertEquals(projection.length, rewritten.getColumnCount()); rewritten.moveToFirst(); @@ -222,5 +245,13 @@ public class EnterpriseContactsCursorWrapperTest extends AndroidTestCase { rewritten.getString(11)); assertEquals("content://com.android.contacts/contacts_corp/12/photo", rewritten.getString(12)); + + + // Verify the 5th row. + rewritten.moveToNext(); + assertEquals("content://com.android.contacts/contacts_corp/13/display_photo", + rewritten.getString(11)); + assertEquals("content://com.android.contacts/contacts_corp/13/photo", + rewritten.getString(12)); } } |