summaryrefslogtreecommitdiff
path: root/tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-11-25 18:35:06 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-11-25 18:35:07 +0000
commitb3c6951e15865ac5a9007d281e12f380a16967e8 (patch)
treed7189c8939792c09441cef51e2876e329a867fb6 /tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java
parente43f8e97a6f37dc23ce13dbfbf0483f1d1f737d3 (diff)
parent3671725b58a9768016e141c77424dedb5fd2c55a (diff)
Merge "Fix Dialer tests"
Diffstat (limited to 'tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java')
-rw-r--r--tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java b/tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java
index f86675e57..fbc64cd64 100644
--- a/tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java
+++ b/tests/src/com/android/dialer/interactions/PhoneNumberInteractionTest.java
@@ -91,7 +91,7 @@ public class PhoneNumberInteractionTest extends InstrumentationTestCase {
Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, 13);
expectQuery(contactUri)
.returnRow(1, "123", 0, null, null, Phone.TYPE_HOME, null,
- Phone.CONTENT_ITEM_TYPE);
+ Phone.CONTENT_ITEM_TYPE, 13);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
mContext, ContactDisplayUtils.INTERACTION_SMS, null);
@@ -110,7 +110,7 @@ public class PhoneNumberInteractionTest extends InstrumentationTestCase {
Uri dataUri = ContentUris.withAppendedId(Data.CONTENT_URI, 1);
expectQuery(dataUri, true /* isDataUri */ )
.returnRow(1, "987", 0, null, null, Phone.TYPE_HOME, null,
- Phone.CONTENT_ITEM_TYPE);
+ Phone.CONTENT_ITEM_TYPE, 1);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
mContext, ContactDisplayUtils.INTERACTION_SMS, null);
@@ -128,10 +128,10 @@ public class PhoneNumberInteractionTest extends InstrumentationTestCase {
public void testSendSmsWhenThereIsPrimaryNumber() {
Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, 13);
expectQuery(contactUri)
- .returnRow(
- 1, "123", 0, null, null, Phone.TYPE_HOME, null, Phone.CONTENT_ITEM_TYPE)
- .returnRow(
- 2, "456", 1, null, null, Phone.TYPE_HOME, null, Phone.CONTENT_ITEM_TYPE);
+ .returnRow(1, "123", 0, null, null, Phone.TYPE_HOME, null,
+ Phone.CONTENT_ITEM_TYPE, 13)
+ .returnRow(2, "456", 1, null, null, Phone.TYPE_HOME, null,
+ Phone.CONTENT_ITEM_TYPE, 13);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
mContext, ContactDisplayUtils.INTERACTION_SMS, null);
@@ -170,9 +170,9 @@ public class PhoneNumberInteractionTest extends InstrumentationTestCase {
Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, 13);
expectQuery(contactUri)
.returnRow(1, "123", 0, null, null, Phone.TYPE_HOME, null,
- Phone.CONTENT_ITEM_TYPE)
+ Phone.CONTENT_ITEM_TYPE, 13)
.returnRow(2, "123", 0, null, null, Phone.TYPE_WORK, null,
- Phone.CONTENT_ITEM_TYPE);
+ Phone.CONTENT_ITEM_TYPE, 13);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
mContext, ContactDisplayUtils.INTERACTION_CALL, null);
@@ -191,7 +191,7 @@ public class PhoneNumberInteractionTest extends InstrumentationTestCase {
Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, 13);
expectQuery(contactUri)
.returnRow(1, "example@example.com", 0, null, null, Phone.TYPE_HOME, null,
- SipAddress.CONTENT_ITEM_TYPE);
+ SipAddress.CONTENT_ITEM_TYPE, 13);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
mContext, ContactDisplayUtils.INTERACTION_CALL, null);
@@ -209,9 +209,9 @@ public class PhoneNumberInteractionTest extends InstrumentationTestCase {
Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, 13);
expectQuery(contactUri)
.returnRow(1, "123", 0, "account", null, Phone.TYPE_HOME, "label",
- Phone.CONTENT_ITEM_TYPE)
+ Phone.CONTENT_ITEM_TYPE, 13)
.returnRow(2, "456", 0, null, null, Phone.TYPE_WORK, null,
- Phone.CONTENT_ITEM_TYPE);
+ Phone.CONTENT_ITEM_TYPE, 13);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
mContext, ContactDisplayUtils.INTERACTION_CALL, null);
@@ -252,7 +252,8 @@ public class PhoneNumberInteractionTest extends InstrumentationTestCase {
RawContacts.DATA_SET,
Phone.TYPE,
Phone.LABEL,
- Phone.MIMETYPE)
+ Phone.MIMETYPE,
+ Phone.CONTACT_ID)
.withSelection("mimetype IN ('vnd.android.cursor.item/phone_v2',"
+ " 'vnd.android.cursor.item/sip_address') AND data1 NOT NULL");
}